powertools-lambda-python icon indicating copy to clipboard operation
powertools-lambda-python copied to clipboard

Docs: Note on default payload_format_version when using Terraform's apigatewayv2

Open rubenfonseca opened this issue 1 year ago • 1 comments

What were you searching in the docs?

When reading the docs on the API Gateway HTTP integration we find this:

Using HTTP API v1 payload? Use APIGatewayRestResolver instead. APIGatewayHttpResolver defaults to v2 payload.

However, when using Terraform's API Gateway v2 module, it defaults to payload version v1.

This can take a long time to debug.

Is this related to an existing documentation section?

https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/#api-gateway-http-api

How can we improve?

Add a note to the documentation that you need to explicitly tell Terraform to use the v2 payload format version.

Got a suggestion in mind?

No response

Acknowledgment

  • [X] I understand the final update might be different from my proposed suggestion, or refused.

rubenfonseca avatar Apr 08 '24 12:04 rubenfonseca

I agree that we can improve our documentation to make it clearer. And I've already opened an issue in the Terraform repository to change this and maintain the same behavior when using AWS and Terraform.

https://github.com/hashicorp/terraform-provider-aws/issues/37035

leandrodamascena avatar Apr 22 '24 09:04 leandrodamascena

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Oct 09 '24 12:10 github-actions[bot]

This is now released under 3.2.0 version!

github-actions[bot] avatar Oct 22 '24 09:10 github-actions[bot]