Friday, 17 January 2020

AWS S3 Static website

We can use S3 Bucket for static website
Upload all the files to the S3 bucket
Grant the Public access to S3  bucket folder
Then launch the public URL
> Console > Click the Bucket > Permissions > Block public access > Edit








>Properties > Static website hosting >




Save>Note the URL http://s3testbucketjhb2020.amazonaws.com






> Permissions > Bucket Policy >
Get the ARN of the bucket and change it below.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::s3testbucketjhb2020/*"
            ]
        }
    ]
}

Launch the URL we get the static website off-course you can define hosting with preferred name and point the redirect follow.

 


No comments: