WAF to Amazon CloudFront to Amazon S3

AWS WWAF → CloudFront → S3 bucket

AWA WAF to CloudFront to S3

This sample project demonstrates how can you deploy a MKDOCS site to S3 with CloudFront.
CloudFront executes a function when receiving a request from the viewer and appends index.html to each request for proper routing.
S3 hosts the HTML files generated from the MKDOCS.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/cloudfront-waf-s3-cdk

Deploy

cdk deploy CloudFrontS3WafStack


Testing

You can test the solution by accessing the CloudFront distribution domain using a web browser.

Cleanup

In the source folder, from the command line enter:
cdk destroy

Created by:

Vikramsinha Patil

Cloud Application Architect at AWS