diff --git a/plugins/modules/iam_password_policy.py b/plugins/modules/iam_password_policy.py index 7c93da4139f..5c65f7ebaec 100644 --- a/plugins/modules/iam_password_policy.py +++ b/plugins/modules/iam_password_policy.py @@ -112,7 +112,7 @@ def __init__(self, module): self.connection = module.resource("iam") self.module = module except Exception as e: - module.fail_json(msg="Failed to connect to AWS: %s" % str(e)) + module.fail_json(msg=f"Failed to connect to AWS: {str(e)}") def policy_to_dict(self, policy): policy_attributes = [