# How to configure yml file or anything else to handle gzip on AWS Lambda

**URL:** <https://forum.serverless.com/t/how-to-configure-yml-file-or-anything-else-to-handle-gzip-on-aws-lambda/15690>\
**Category:** Serverless Framework\
**Tags:** lambda, api-gateway\
**Created:** [August 5, 2021, 4:59pm UTC](https://forum.serverless.com/t/how-to-configure-yml-file-or-anything-else-to-handle-gzip-on-aws-lambda/15690 "2021-08-05T16:59:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rankly76](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@rankly76](https://forum.serverless.com/u/rankly76)\
**Post date:** [August 5, 2021, 4:59pm UTC](https://forum.serverless.com/t/how-to-configure-yml-file-or-anything-else-to-handle-gzip-on-aws-lambda/15690/1 "2021-08-05T16:59:22Z")

</div>

An external server POST request with its results compressed in the gzip format. I tried to decompress it to JSON objects but it is not working.

console.log(event.body) output a string which you will find here [Online Notepad - body paylod](https://anotepad.com/notes/c7ccprqc) ( it is a long string).

I tried to convert to base64 format and then parse to json - it did not work. I also tried to use zlib of nodeJs to unzip.

None of the following codes has helped me to get the data to json format.

It seems I am missing something to setup.

What I will need to configure on Serveless.yml file?

Btw, I tried to follow this tutorial [gzip on AWS Lambda and API Gateway | by Christoph Neijenhuis | commercetools tech](https://techblog.commercetools.com/gzip-on-aws-lambda-and-api-gateway-5170bb02b543) but it also did not work for me.

I will highly appreciate any help/guide.
