Implement the necessary steps to enable logging on API Gateway stages.
Rule | API Gateway stage logging should be enabled |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ High |
Rule Description:
API Gateway stage logging should be enabled for NIST 800-171 Revision 2 compliance. This logging requirement helps ensure that all activities performed in the API Gateway stages are recorded, allowing for auditing and monitoring of potential security incidents or unauthorized access attempts.
Troubleshooting Steps:
Necessary Code:
If the API Gateway stage logging is not enabled, you will need to add or modify the following code in your API Gateway configuration.
// Sample code to enable API Gateway stage logging // Replace <stage-name> with the name of your API Gateway stage aws apigateway update-stage \ --rest-api-id <rest-api-id> \ --stage-name <stage-name> \ --patch-operations op=replace,path=/logging/dataTrace,value=true
Step-by-Step Guide for Remediation:
Follow the steps below to enable API Gateway stage logging for NIST 800-171 Revision 2 compliance:
Note: It is recommended to refer to the AWS API Gateway documentation and NIST 800-171 Revision 2 guidelines for additional details and best practices regarding API Gateway stage logging.