Open drewboardman opened 7 months ago
This approach seems safer than modifying an identity-based policy. It creates a separate resource-based policy document specifically granting lambda:ListVersionsByFunction and attaches it directly to the Lambda function itself.
With the lambda resource described in the tutorial, terraform encounters the following error:
This is not alleviated by any of the IAM policies you can attach to your Group or User. For instance the
AWSLambda_FullAccess
contains thelambda:*
permissions (all policy permissions). You still encounter the error.I found a stack overflow thread that describes why this is the case.
Below is an addition that can be added to the example code (and hopefully the tutorial), that will correct this error.
You can find this permission in
IAM -> Roles -> serverless_lambda
. You should see thislambda_list_versions
permissions policy.