AWS DevOps Practice Summary

Source: Dev.to | Jan 16, 2026 (UTC)

AWS Setup

S3 Bucket Creation

  • Created a bucket: believe-in-bucket on AWS Free Tier.
  • Bucket settings: default “Block Public Access ON”, Object Ownership: Bucket owner enforced.

EC2 Instance

  • Launched an EC2 instance (Amazon Linux 2)
  • Connected via SSH from WSL2 and VSCode Remote-SSH
  • Verified IAM role attached to EC2 had **AmazonS3FullAccess **to communicate with S3.

2. EC2 → S3 Connectivity

Verified connection:

aws s3 ls aws s3 ls s3://believe-in-bucket

Enter fullscreen mode

Exit fullscreen mode

SCP / VSCode Connectivity

ssh ec2-dev

Enter fullscreen mode

Exit fullscreen mode

Uploading DevOps Folder to EC2

Uploading to S3

aws s3 cp ~/DevOps s3://believe-in-bucket/ --recursive --acl public-read

Enter fullscreen mode

Exit fullscreen mode

  1. AccessControlListNotSupported → caused by bucket having owner enforced ACLs

    1. Only index.html uploaded → folder structure and .git skipped (by default & ACL errors)
    2. Bucket policy changes failed → due to Block Public Access being ON
  1. Removed --acl public-read

  2. Excluded .git folder explicitly:

aws s3 cp ~/DevOps s3://believe-in-bucket/ --recursive --exclude ".git/*"

Enter fullscreen mode

Exit fullscreen mode

  1. Verified folder structure:

aws s3 ls s3://believe-in-bucket/ --recursive

Enter fullscreen mode

Exit fullscreen mode

Static Website Hosting

aws s3 website s3://believe-in-bucket/ --index-document index.html

Enter fullscreen mode

Exit fullscreen mode

Troubleshooting:

  1. Disable Block Public Access (for testing)

  2. Add bucket policy for public read:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::believe-in-bucket/*" } ] }

Enter fullscreen mode

Exit fullscreen mode

<body> <h1>Welcome to AWS DevOps!</h1> </body>

Enter fullscreen mode

Exit fullscreen mode

Final Folder Structure in S3

index.html css/style.css js/app.js

Enter fullscreen mode

Exit fullscreen mode

Key Lessons / Gotchas

  1. S3 ACL vs Bucket Owner Enforced
  1. ** Recursive uploads**
  1. Static Website
  1. SSH / SCP / VSCode
  1. Blank page troubleshooting

Outcome:

For further actions, you may consider blocking this person and/or reporting abuse

Залишити відповідь

Ваша e-mail адреса не оприлюднюватиметься. Обов’язкові поля позначені *

Читайте також