Skip to content

Latest commit

 

History

History
45 lines (41 loc) · 1.46 KB

File metadata and controls

45 lines (41 loc) · 1.46 KB

UI Deployment

For deploying the frontend, I used AWS S3 static website hosting

Guide to deploy frontend to S3

  1. In AWS console search for S3
  2. Click on the Create bucket button. It will launch a new wizard.
  3. Provide the bucket-name and the region where you want to locate the bucket.
  4. Under public access settings, uncheck the Block all public access option

    Make sure to check ✅ I acknowledge that the current settings might result in the his bucket and the objects within becoming public

  5. Disable Bucket Versioning for the sake of this project
  6. Click Create bucket
  7. After creation choose the bucket
  8. Choose 'Permission' tab
  9. In 'Bucket policy' section choose 'Edit'
  10. Add bucket policy
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKETNAME/*"
            ]
        }
    ]
}

Make sure change BUCKETNAME to your bucket name and save changes

  1. Now go to 'Properties' tab
  2. In 'Static website hosting' section choose Edit
  3. choose Enable, *Host a static website, and provide index document e.g. index.html
  4. Save changes.

To upload files to your bucket use:

aws s3 cp --recursive ./www s3://BUCKETNAME/

My Bucket

My S3 Bucket