aws-samples / serverless-patterns

Serverless patterns. Learn more at the website: https://serverlessland.com/patterns.
https://serverlessland.com
Other
1.47k stars 858 forks source link

New pattern submission - CloudFront to CloudFront Function to S3 Static Site with Geo Localization Rewrites #2243

Open Gryczka opened 1 month ago

Gryczka commented 1 month ago

To submit a template to the Serverless Patterns Collection, submit an issue with the following information.

IMPORTANT Patterns are intended to be primarily IaC-focused implementations of 2-4 AWS services, with minimum custom code. They should be commonly used combinations that help developers get started quickly. If you have a utility, demo, or application, submit these to the Serverless Repos Collection instead.

ONLY SUBMIT ONE PATTERN CHANGE PER PR. Multiple patterns or files spanning multiple pattern directories will be automatically rejected.

Patterns may take up to 4-6 weeks to review, test, and merge but there is no SLA and can take significantly longer due to other work the team has.

To learn more about submitting a pattern, read the publishing guidelines page.

  1. Use the model template located at https://github.com/aws-samples/serverless-patterns/tree/main/_pattern-model to set up a README, template and any associated code.

  2. THIS PROCESS HAS BEEN SIMPLIFIED. All the information below must be provided in the "example-pattern.json" file cloned from the model **

Note the following information for the model:

"This pattern shows how to create a CloudFront Distribution with a CloudFront Function for Routing to Different Geo-Localized Content in an S3 Statically Hosted Website. Implemented in AWS CDK .NET.", "CloudFront Distributions can be configured to forward the 'CloudFront-Viewer-Country' header. CloudFront Functions allow for javascript code to execute at CloudFront edge locations, and allow you to create url routing and rewrite rules based on request headers. In this pattern we use the "CloudFront-Viewer-Country" header to determine the location of the request and rewrite the URI to point to different content based on the location of the request. Specifically in this example that means pointing to an index.html in a prefix that is applied based on the location.", "This pattern deploys one CloudFront Distribution with a CloudFront Function and an S3 Static Website."

You must ensure that the sections of the model README.md are completed in full.

GitHub PR for template: