-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
When setting up a new Next.js app with 0.9.0, the first apply may fail with the following error message:
Error: error creating Lambda Event Source Mapping (arn:aws:sqs:eu-central-1:430654418481:terraform-next-js-existing-cloudfront20210615141542329600000006): InvalidParameterValueException: The provided execution role does not have permissions to call ReceiveMessage on SQS
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "a08ca594-80e3-4db8-8176-dc140f31565a"
│ },
│ Message_: "The provided execution role does not have permissions to call ReceiveMessage on SQS",
│ Type: "User"
│ }
│
│ with module.tf_next.module.statics_deploy.module.deploy_trigger.aws_lambda_event_source_mapping.this["sqs_source"],
│ on .terraform/modules/tf_next.statics_deploy.deploy_trigger/main.tf line 211, in resource "aws_lambda_event_source_mapping" "this":
│ 211: resource "aws_lambda_event_source_mapping" "this" {
It seems like there is some race condition when the policy for the Lambda is created.
Workaround
You should be able to runterraform apply
again and the stack creation would progreed without this error.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working