More Info:

Content Encoding feature should be enabled for your Amazon API Gateway APIs in order to facilitate API payload compression.

Risk Level

Low

Address

Reliability, Security

Compliance Standards

CBP

Triage and Remediation

Remediation

To remediate the “Content Encoding Should Be Enabled For APIs” misconfiguration in AWS using the AWS console, follow these steps:

  1. Open the AWS Management Console and navigate to the Amazon API Gateway service.

  2. Select the API that you want to remediate.

  3. In the left navigation pane, click on “Stages”.

  4. Select the appropriate stage for your API.

  5. Click on the “Settings” tab.

  6. Under the “Content Encoding” section, click on the “Edit” button.

  7. Enable the “Content Encoding” option by selecting the checkbox.

  8. Click on the “Save Changes” button.

  9. Repeat steps 4-8 for all the stages of your API.

Enabling content encoding for your API will ensure that the API responses are compressed, which reduces the amount of data sent over the network and improves the performance of your API.

Additional Reading: