Secure, secret-less AWS service communication using IAM Roles.
This project demonstrates the best practice for granting an EC2 instance access to an S3 bucket without using hardcoded credentials, leveraging IAM instance profiles.
- IAM Instance Profiles: Attach permissions directly to compute resources.
- Apache Setup: Basic web server configuration on the EC2 instance.
- AWS CLI Usage: Practical examples of interacting with S3 from the command line.
flowchart LR
EC2["EC2 Instance (Apache)"] -->|Assume Role| Role["IAM Role"]
Role -->|Permit Access| S3["S3 Bucket"]
.
├── index.html # Sample web content
├── screenshots/ # Visual guide for IAM and instance setup
└── README.md # Project documentation
- Cloud: AWS (EC2, S3, IAM)
- Web Server: Apache (HTTPD)
- Tooling: AWS CLI
Configure a basic EC2 instance (Amazon Linux 2023).

SSH into the instance and install the web server.

Verify the web server is reachable via the public IP.

Create an IAM Role with S3ReadOnlyAccess policy.

Attach the created IAM instance profile to your running EC2 instance.

Use the AWS CLI on the instance to list files from S3 without providing manual keys.
