Download aws-ipranges-api.yaml
file and login to AWS CloudFormation console. Choose Create Stack, Upload a template file, Choose File, select aws-ipranges-api.yaml
and choose Next.
Specify a Stack name and adjust parameters values as desired. Parameters options include
HTTP API
allowNetworks
: Source IP prefixes that are authorized to use API separated by commas. Default is0.0.0.0/0
awsServices
: Names of AWS service to return by root URL separated by commas. Default isCLOUDFRONT_ORIGIN_FACING
Lambda
pythonRuntime
: Python runtime version. Default ispython3.12
cpuArchitecture
: instruction set architecture, eitherx86_64
orarm64
. Default isarm64
Custom domain name (optional)
This section is optional
customDomainName
: custom domain namecertificateArn
: ARN of ACM certificatedisableDefaultEndPoint
: option to disable default endpoint. This ensures that clients can only access API by using specifiedcustomDomainName
Continue Next with Configure stack options, Review settings, and click Create Stack to launch your stack.
After stack has been successfully created, its status changes to CREATE_COMPLETE.
The following are available in Outputs
section
-
apiGatewayInvokeURL
(ifdisableDefaultEndPoint
isNo
): URL of formathttps://<api-id>.execute-api.<region>.amazonaws.com
-
apiFQDN
(ifcustomDomainName
is specified): Create a DNS CNAME or Route 53 alias record of yourcustomDomainName
to this value -
apiGatewayLog
: CloudWatch log URL for API Gateway -
lambdaFunctionLog
: CLoudWatch log URL for Lambda function -
lambdaAuthorizerFunctionLog
: CloudWatch log URL for Lambda authorizer function
Refer to Amazon API Gateway documentation for HTTP API customisation options. Some examples include
- Routing traffic to an Amazon API Gateway API by using your domain name
- Configuring mutual TLS authentication
- Throttling requests to your HTTP API
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.