Lambda function should have been created. I can create Lambda functions in the AWS GUI using the exact same user as the one I'm currently authenticated to the AWS CLI with.. but with this exact same user, TF fails. Creating lambda functions in the portal doesn't require iam:ListRolePolicies permission so why does creating it with TF require it?
Actual Behavior
│ Error: reading inline policies for IAM role lambda_execution_role, error: operation error IAM: ListRolePolicies, https response error StatusCode: 403, RequestID: ---, api error AccessDenied: User: --- is not authorized to perform: iam:ListRolePolicies on resource: role lambda_execution_role because no identity-based policy allows the iam:ListRolePolicies action
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.4.0
AWS Provider Version
5.57.0
Affected Resource(s)
aws_lambda_function
Expected Behavior
Lambda function should have been created. I can create Lambda functions in the AWS GUI using the exact same user as the one I'm currently authenticated to the AWS CLI with.. but with this exact same user, TF fails. Creating lambda functions in the portal doesn't require iam:ListRolePolicies permission so why does creating it with TF require it?
Actual Behavior
│ Error: reading inline policies for IAM role lambda_execution_role, error: operation error IAM: ListRolePolicies, https response error StatusCode: 403, RequestID: ---, api error AccessDenied: User: --- is not authorized to perform: iam:ListRolePolicies on resource: role lambda_execution_role because no identity-based policy allows the iam:ListRolePolicies action
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Deploy TF
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None