Goal
Goal of this project to create public S3 Bucket in AWS cloud and update Bucket policy to allow access to the bucket only from whitelisted public IPs.
Pre-Requisites
- AWS IAM user access key & secret key accessing S3.
- Visual Studio Code configured to develop Terraform IaC
IaC Deployment
- Create S3 Bucket in ‘us-east-1’ region
- Enable Bucket versioning
- Update Bucket ACL to public access.
- Create IAM policy to allow Bucket objects only from the specific whitelisted public IP (Get the public IP of your system to whitelist the IP)
- Update Bucket Policy with the IAM policy that created in step 3.
Validation
- Upload Object to Bucket using AWS CLI
- Access the Objects using Object URL from public browser(While your system has same public IP whitelisted)
- Access the Objects using Object URL from public browser (While your system has different public IP, Reconnect to internet might change your public IP for testing.)
© Edwiki Trainings – Click HERE If you are interested to learn more on Cloud & DevOps stack.