DEV Community

Akanksha Agrawal
Akanksha Agrawal

Posted on

Aws S3 Bucket Deployment

*Steps: *

  1. Create Angular App ---- ng new angular-app-new

  2. Build Angular app for production----> ng build --prod

  3. Then dist. folder has been created. Inside we have all the
    files that we deploy.

  4. Sign in to the AWS management console

  5. Create s3 bucket

S3 service-> create bucket name-> bucket name-angularnew12-app-> uncheck block all public
access.-> other will be default-> hit create button.

  1. Upload Angular build files to an S3 bucket
    Click on that particular bucket:
    Add files -> dist. folder-> select all -> open-> successfully uploaded.

  2. Deploy on AWS S3 service
    go to properties-> static website hosting -> enable-> then we have index document ->
    index.html -> save changes

or you can add a bucket policy :
{
"Version": "2022-06-22",
"Statement": [
{
"Effect": "Allow",
"Principal": "",
"Action": [
"s3:GetObject"
],
"Resource": "arn:aws:s3:::angularnew12-app/
"
}
]
}
go to objects-> select all files -> actions -> make it public.

The project is deployed on AWS s3.

Top comments (0)