diff --git a/cloudformation/.gitkeep b/cloudformation/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/cloudformation/static-web-site-distribution/README.md b/cloudformation/static-web-site-distribution/README.md new file mode 100644 index 0000000..408f8e6 --- /dev/null +++ b/cloudformation/static-web-site-distribution/README.md @@ -0,0 +1,27 @@ +## Static Web Site Distribution With CloudFront and S3 +### Overview +The simplest way to deploy the static website is to store the content in Amazon S3 (Simple Storage Service) and distribute it using CloudFront (Content Delivery Network). + +This infrastructure configuration looks like the diagram below.   +![./s3_cloudfront.png](./s3_cloudfront.png) + +The configuration is characterized by its simplicity and the following features: + +1. Cost-effectiveness +2. Responsive performance through effective utilization of caching (Cache Distribution pattern) + +However, there are constraints. For example, if there is a functionality to rewrite a Relational Database on the client side, it cannot be accommodated with the infrastructure configuration depicted in the diagram. + + +#### Not allowed to access S3 directly +As a premise, you can host a static website using S3. In this context, a static website refers to content on individual web pages being static, although client-side scripts may be included. + +In other words, S3 content can be publicly accessible, allowing direct access to S3. However, enabling public access to S3 poses security risks and the potential for information leakage. In general, public access to S3 should be disabled. For instance, there is a risk of personal information being stolen from S3 by third parties, or the possibility of delivering compromised JavaScript containing malicious code. + +To prevent such scenarios, it is essential to appropriately configure the S3 bucket policy. + +#### Access Log +[WIP] + +#### Chache +[WIP] \ No newline at end of file diff --git a/cloudformation/static-web-site-distribution/s3_cloudfront.drawio b/cloudformation/static-web-site-distribution/s3_cloudfront.drawio new file mode 100644 index 0000000..12a3198 --- /dev/null +++ b/cloudformation/static-web-site-distribution/s3_cloudfront.drawio @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cloudformation/static-web-site-distribution/s3_cloudfront.png b/cloudformation/static-web-site-distribution/s3_cloudfront.png new file mode 100644 index 0000000..b74270a Binary files /dev/null and b/cloudformation/static-web-site-distribution/s3_cloudfront.png differ