Terraform aws provider invalid arn for s3 lambda permission
See original GitHub issuePackaging the chalice app for terraform is giving me an invalid source_arn error for the aws_lambda_permission s3event "source_arn": "arn:*:s3:::lambda-function-name
Error: "source_arn" (arn:*:s3:::lambda-function-name) is an invalid ARN:
invalid partition value (expecting to match regular expression: ^aws(-[a-z]+)*$)
I can’t determine whether this is an issue with the validation of the provider or with how chalice is packaging this up?
https://github.com/aws/chalice/blob/ba93124276c3f2d360286396e536520c9fa5fecf/chalice/package.py#L853
chalice 1.18.1 & 1.19.0, python 3.8.0, terraform aws provider 3.4.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Terraform invalid arn for aws provider - Stack Overflow
Because chalice is not responsible for creating the S3 bucket itself, only the lambda and the event source mapping it's creating this arn...
Read more >aws_lambda_permission | Resources | hashicorp/aws
Resource: aws_lambda_permission. Gives an external source (like an EventBridge Rule, SNS, or S3) permission to access the Lambda function.
Read more >Resolve "Invalid principal in policy" error in Amazon S3
I'm trying to add or edit the bucket policy of my Amazon Simple Storage Service (Amazon S3) bucket using the console.
Read more >Ensure that lambda function permission has a source arn ...
When the principal is an AWS service, the ARN of the specific resource within that service to grant permission to. Without this, any...
Read more >Terraform Import - Leaving Click Ops Behind - Earthly Blog
Above, I'm pulling in the terraform AWS provider and setting my region. ... My lambda also uses S3 to cache results and so...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kapilt Should be fixed in #1550. I switched it over to
${data.aws_partition.chalice.partition}
.a previous version in #1417 used a terraform data partition to construct arns, that should be used again to fix these issues, it was removed for reasons of inconsistencies on dns suffix, but it should be retained for arn construction.