Download aws-ipranges-cloudfront.yaml
file and login to AWS CloudFormation console. Choose Create Stack, Upload a template file, Choose File, select aws-ipranges-cloudfront.yaml
and choose Next.
Specify a Stack name and adjust parameters values as desired. Parameters options include
CloudFront API
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
CloudFront
enableIPv6
: enable or disable IPv6. Default isyes
viewerProtocolPolicy
: configure viewer access policy for HTTP and HTTPS requests. Default isredirect-to-https
cachePolicy
: managed cache policy. Default isCachingDisabled
responseHeaderPolicy
: managed response headers policy. Default isSecurityHeadersPolicy
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
cloudFrontURL
: CloudFront distribution domain namecloudFrontConsole
: CloudFront console URLlambdaFunctionLog
: CLoudWatch log URL for Lambda function
Refer to Amazon CloudFront documentation for customisation options. Some examples include
- Use custom URLs by adding alternate domain names (CNAMEs)
- Routing traffic to an Amazon CloudFront distribution by using your domain name
- Use AWS WAF protections
- Restricting the geographic distribution of your content
- CloudFront and edge function logging
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.