Skip to content

Understanding of the compress option #1890

Closed
@rubenfonseca

Description

@rubenfonseca

Discussed in #1885

Originally posted by nilsm0hr February 1, 2023
Hi,

I tired to understand the compress option in PowerTools. We have started to implement powertools on our functions. Some of them compressed the Lambda response in our python code and returned the base64 payload to enable larger payloads.

The documentation suggests that you just return an object, rather than the Response object powertools provides. Looking at the source code, I managed to use the powertools response object after I dumped my json response to a string.

Would it be possible to make the docs a bit clearer around this? Not quite sure if I am misunderstanding something here.

https://awslabs.github.io/aws-lambda-powertools-python/2.7.1/core/event_handler/api_gateway/#compress

Thanks

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationevent_handlershelp wantedCould use a second pair of eyes/hands

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions