*Steps: *
Create Angular App ---- ng new angular-app-new
Build Angular app for production----> ng build --prod
Then dist. folder has been created. Inside we have all the
files that we deploy.Sign in to the AWS management console
Create s3 bucket
S3 service-> create bucket name-> bucket name-angularnew12-app-> uncheck block all public
access.-> other will be default-> hit create button.
Upload Angular build files to an S3 bucket
Click on that particular bucket:
Add files -> dist. folder-> select all -> open-> successfully uploaded.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)