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

Wrong example on complete-http? #41

Closed
alekc opened this issue Jun 9, 2021 · 2 comments
Closed

Wrong example on complete-http? #41

alekc opened this issue Jun 9, 2021 · 2 comments

Comments

@alekc
Copy link

alekc commented Jun 9, 2021

Description

While following example for complete-http, I was deploying my lambda as following:

module "chartmuseum_lambda_function" {
  source = "terraform-aws-modules/lambda/aws"

  function_name  = "chart-museum"
  description    = "Chart museum container"
  create_package = false
  package_type   = "Image"
  image_uri      = docker_registry_image.chart-museum.name
  tags           = var.tags
  publish        = true
  allowed_triggers = {
    AllowExecutionFromAPIGateway = {
      service    = "apigateway"
      source_arn = "${module.chartmuseum_api_gateway.apigatewayv2_api_execution_arn}/*/*/*"
    }
  }
}

As result, it was impossible to execute the lambda due to an error

[09/Jun/2021:12:17:05 +0000] "GET $default HTTP/1.1" 500 35 AqCiOhxcLPEEMIA= The IAM role configured on the integration or API Gateway doesn't have permissions to call the integration. Check the permissions and try again

Only when I changed the source_arn to

 source_arn = "${module.chartmuseum_api_gateway.apigatewayv2_api_execution_arn}/*/*"

it began to work correctly.

Not sure if it's a common case for everyone or not.

@antonbabenko
Copy link
Member

This is a bug, you are right. Fixed in 76e7ce2.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants