API Gateway endpoint type must be set to PRIVATE to prevent the API from being exposed to the public internet, which increases attack surface and can enable unauthorized access or data exfiltration.
For Ansible tasks using the community.aws.api_gateway or api_gateway modules, the endpoint_type property must be defined and set to PRIVATE. Tasks missing this property or with endpoint_type not set to PRIVATE are flagged. A PRIVATE endpoint restricts access to VPC endpoints, so ensure the required VPC endpoint and networking is configured to allow authorized clients to reach the API.
Secure Ansible task example:
- name:Create private API Gatewaycommunity.aws.api_gateway:name:my-private-apiendpoint_type:PRIVATEstate:present
Compliant Code Examples
- name:Setup AWS API Gateway setup on AWS and deploy API definitioncommunity.aws.api_gateway:name:my-private-apiswagger_file:my_api.ymlstage:productioncache_enabled:truecache_size:'1.6'tracing_enabled:trueendpoint_type:PRIVATEstate:present
Non-Compliant Code Examples
- name:Setup AWS API Gateway setup on AWS and deploy API definitioncommunity.aws.api_gateway:name:my-edge-apiswagger_file:my_api.ymlstage:productioncache_enabled:truecache_size:'1.6'tracing_enabled:trueendpoint_type:EDGEstate:present
1
2
rulesets:- Ansible / AWS # Rules to enforce / AWS.
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.