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

Terraform issues on Lambda & media policy #38

Open
ayoubeddafali opened this issue Jul 16, 2024 · 1 comment
Open

Terraform issues on Lambda & media policy #38

ayoubeddafali opened this issue Jul 16, 2024 · 1 comment

Comments

@ayoubeddafali
Copy link

I guess after adding the new changes for media optimization with lamda, terraform seems to fail due to some issues

  1. Invalid Actions & Resources at :

    │ with aws_s3_bucket_policy.media,
    │ on s3.tf line 165, in resource "aws_s3_bucket_policy" "media":
    │ 165: resource "aws_s3_bucket_policy" "media" {

  2. InvalidParameterValueException: The provided execution role does not have permissions to call CreateNetworkInterface on EC2

    │ with aws_lambda_function.image_optimization,
    │ on lambda.tf line 75, in resource "aws_lambda_function" "image_optimization":
    │ 75: resource "aws_lambda_function" "image_optimization" {

@ayoubeddafali ayoubeddafali changed the title Terraform issues on Lamdab & media policy Terraform issues on Lambda & media policy Jul 16, 2024
@ayoubeddafali
Copy link
Author

ayoubeddafali commented Jul 16, 2024

@magenx Thanks

I still get the following error for the media policy

╷
│ Error: putting S3 Bucket (magento-p4j3c18-media) Policy: operation error S3: PutBucketPolicy, https response error StatusCode: 400, RequestID: YJFN1Y05FT2QG4VM, HostID: Kjdiu4Ek+w0rEy3gnq5tuv1PMY5PXBcSilfYepWMh8Pir/gqGZP0/UOLQzQvoVtPlefxTAFjjos=, api error MalformedPolicy: Policy has invalid resource
│ 
│   with aws_s3_bucket_policy.media,
│   on s3.tf line 164, in resource "aws_s3_bucket_policy" "media":
│  164: resource "aws_s3_bucket_policy" "media" {
│ 
╵

Not sure what the resource in question is. Do you get the same error ?

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

No branches or pull requests

1 participant