Security is highly prioritized in all AWS services.Also, there are different options to encrypt your data at rest with unlimited storage. Check this link if you want to learn more about AWS S3 Bucket.
we will be selecting this bucket that is already created , in case you do not know how to create one check out this link . Click on your bucket name
3. Click on to upload and add your files by clicking Add Folder or Add files.
4. Now let’s upload the web content and scroll down click upload your files
5. Now go back to your bucket and click Properties scroll down to Static website hosting. Click edit.
6. Now Click enable Static website hosting. and make sure your index.html path is correct and Click on to Save changes
7. Now let’s set permissions, first we need to enable public access. For that, we need to go to the permissions Click o to edit under Block public access .
8. Now lets et a bucket policy, Click on to Permissions, and then Bucket Policy the Click edit. Copy this Bucket policy that grants read-write access for the website. Make sure you replace Bucket arn -s3static-ictpro with your Bucket arn
Now Click Save Changes and confirm.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": [ "s3:GetObject" ], "Resource": [ "arn:aws:s3:::s3static-ictpro/*" ] } ] }
9. Now Navigate to your Bucket and Click on to properties Scroll down.
In the end you can see a endpoint which is your website url
http://s3static-ictpro.s3-website-ap-southeast-2.amazonaws.com
Hurray Congratulation , you have successfully created a Static webpage in AWS with S3
Share Now !