Using network restrictions
- If we don’t configure service endpoints, ec2 instances will be accessing the s3 bucket over internet.
- If the s3 is accessed over internet it cannot determine vpc. conditions like vpc or vpce can be used when we create service endpoints to vpc
Hosting a static website using AWS S3
- AWS S3 makes it very easy to host a static website with html and json content.
- To Create a static website
- An S3 bucket for hosting the content
- A Route 53 hosted zone and necessary DNS records (for custom domains)
- Lets create a s3 bucket with name "ltstoragelearning.com"
- Now enable static website hosting
Content Delivery Networks with Amazon Cloudfront
Cloudfront is CDN as a service.
In AWS global infrastructure we have Point of Presence locations, These locations can be leveraged to deploy a CDN solution.
To experiment with cloudformation, create an s3 bucket (public read access)
Lets create 3 folders
Create a html page which will shown these files