Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: actionable error on non-ARN policy #3132

Merged
merged 15 commits into from Apr 27, 2023
Merged

feat: actionable error on non-ARN policy #3132

merged 15 commits into from Apr 27, 2023

Conversation

hoffa
Copy link
Contributor

@hoffa hoffa commented Apr 26, 2023

Issue #, if available

Description of changes

Value is passed to ManagedPolicyArns which must be ARNs:

if policy_arn not in managed_policy_arns:
managed_policy_arns.append(policy_arn)

execution_role.ManagedPolicyArns = list(managed_policy_arns)

If it's a string but not an ARN, the deployment will fail either way, so it's backward compatible for us to fail instead with a more helpful error.

Description of how you validated changes

Checklist

Examples?

Please reach out in the comments if you want to add an example. Examples will be
added to sam init through aws/aws-sam-cli-app-templates.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hoffa hoffa marked this pull request as ready for review April 27, 2023 21:24
@hoffa hoffa requested a review from a team as a code owner April 27, 2023 21:24
@hoffa hoffa merged commit f829cc8 into aws:develop Apr 27, 2023
8 checks passed
@hoffa hoffa deleted the fail-non-arn-mp branch April 27, 2023 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants