# ✅ Day 10 of My Cloud Journey ☁ – Hands-on with Amazon S3 using AWS CLI on EC2 💻🪣

Today I rolled up my sleeves and got *practical* with one of the most valuable cloud combinations: **Amazon EC2 + S3 + AWS CLI**. This is where you start seeing how DevOps, automation, and cloud-native development come together in real workflows.

---

## 🔍 What Was Today All About?

While the AWS Console is beginner-friendly and visual, the **AWS CLI (Command Line Interface)** offers powerful automation and scripting capabilities — vital for production-grade environments.

Today, I connected to a running EC2 instance and used the AWS CLI to:

* Create an S3 bucket
    
* Upload/download files
    
* Securely manage permissions with **IAM Roles**
    
* Automate storage operations from the terminal
    

---

## 🛠️ What I Did (Hands-On Steps):

1️⃣ **Launched an EC2 Instance** using Amazon Linux 2023  
2️⃣ **SSH Access** to connect securely via terminal  
3️⃣ Installed the AWS CLI (already pre-installed on Amazon Linux)  
4️⃣ Configured credentials using `aws configure` *(for test/demo only)*  
5️⃣ Created a new S3 bucket directly from the terminal  
6️⃣ Uploaded and downloaded files  
7️⃣ **Tested IAM Role-based Access** without needing access keys 🎯

---

## 💻 CLI Commands I Practiced

Here's a cheat sheet of the AWS CLI commands I used:

```plaintext
bashCopyEditaws s3 mb s3://my-bucket-name             # Create a bucket
aws s3 ls                                 # List all buckets
aws s3 cp myfile.txt s3://my-bucket-name # Upload a file
aws s3 ls s3://my-bucket-name            # List contents of the bucket
aws s3 cp s3://my-bucket-name/myfile.txt . # Download the file
aws s3 rm s3://my-bucket-name/myfile.txt # Delete the file
```

---

## 🔐 IAM Roles vs. AWS Configure

| Method | Description | Use Case |
| --- | --- | --- |
| `aws configure` | Manually set access key and secret | Not recommended for production |
| **IAM Role** | Attach role to EC2 for secure, keyless access | ✅ Preferred for automation and security |

📌 **Key Learning**: IAM Roles eliminate the need to store credentials in code or config — a major win for **security-first cloud architectures**.

---

## 🧠 What I Learned

✅ How **EC2 and S3** work together seamlessly  
✅ CLI operations are **much faster** and perfect for automation  
✅ IAM Roles allow **secure, credential-free access** to services  
✅ CLI is **essential** for DevOps tasks, backups, deployments, and more

---

## 🌍 Real-World Use Cases

🔹 Automate logs or reports upload to S3  
🔹 Backup critical files from EC2 to S3  
🔹 Lambda/EC2 fetching config/data from S3 at runtime  
🔹 Trigger events when objects are uploaded (using S3 events + Lambda)  
🔹 Build **cron jobs** for automated sync between local storage and S3

---

## 🧩 Recap: Why AWS CLI Matters in Cloud Workflows

* Works consistently across platforms (Linux, macOS, Windows)
    
* Enables scripting & automation
    
* Faster than Console for bulk or repeated tasks
    
* Easily integrates into **CI/CD pipelines**, **Bash scripts**, and **cron jobs**
    
* Reduces error-prone manual processes.
    

## 📅 What’s Next?

🔁 **Tomorrow – Day 11**:  
We’ll shift gears from storage to **networking** as I dive into **Amazon VPC (Virtual Private Cloud)** and explore:

* 🔹 What is a VPC?
    
* 🔹 Subnets (Public vs. Private)
    
* 🔹 Internet Gateway (IGW)
    
* 🔹 NAT Gateway
    
* 🔹 Route Tables and how traffic flows in AWS
    

Understanding VPC is **crucial** for deploying secure and scalable cloud applications — don’t miss it! 🧠🌐

---

### 🏷️ Hashtags

`#Day10 #30DaysOfCloud #AWS #S3 #AmazonS3 #AWSCLI #CloudComputing #EC2 #IAM #DevOps #LearnInPublic #CloudSkills #Automation #Hashnode #CloudStorage #TruptiMane #ShellScripting #CloudProjects #VPC #Networking #Day11Preview`
