# Day38 of #90DaysOfDevOps

# **What is AWS?**

Amazon Web Services (AWS) is a comprehensive cloud computing platform provided by Amazon. It offers a wide range of services, including computing power, storage, databases, networking, machine learning, and security.

## **Key Features of AWS**

* **Scalability:** Easily scales resources up or down as needed.
    
* **Cost-Effective:** Pay-as-you-go pricing model with no upfront costs.
    
* **Security:** Provides strong security measures, including encryption and compliance certifications.
    
* **Global Reach:** Data centers across multiple regions worldwide for high availability.
    
* **Reliability:** Ensures minimal downtime with redundant infrastructure.
    

## **Popular AWS Services**

* **Compute:** Amazon EC2 (Elastic Compute Cloud), AWS Lambda
    
* **Storage:** Amazon S3 (Simple Storage Service), EBS (Elastic Block Store)
    
* **Databases:** Amazon RDS, DynamoDB
    
* **Networking:** Amazon VPC (Virtual Private Cloud), Route 53
    
* **Security & Identity:** AWS IAM (Identity and Access Management), AWS Shield
    

## **Why Use AWS?**

AWS is widely used due to its flexibility, extensive service offerings, and ability to support businesses of all sizes, from startups to enterprises. It helps in reducing operational costs and improving scalability.

---

# **What is IAM?**

IAM (Identity and Access Management) is a framework of policies and technologies that ensures the right individuals have appropriate access to resources in an organization. It helps manage digital identities and control user permissions securely.

## Key Components of IAM

1. **Authentication** – Verifies user identity (e.g., passwords, biometrics, multi-factor authentication).
    
2. **Authorization** – Determines what resources a user can access.
    
3. **User Management** – Handles user roles, groups, and lifecycle management.
    
4. **Access Control Policies** – Defines permissions using models like Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC).
    

## Importance of IAM

* Enhances security by preventing unauthorized access.
    
* Improves compliance with regulations (e.g., GDPR, HIPAA).
    
* Streamlines user management and reduces administrative overhead.
    

## Common IAM Tools

Popular IAM solutions include AWS IAM, Microsoft Azure AD, Okta, and Google Cloud IAM.

# **Task1:**

**Create an IAM user with username of your own wish and grant EC2 Access. Launch your Linux instance through the IAM user that you created now and install jenkins and docker on your machine via single Shell Script.**

Log in to your AWS Management Console.

* Go to the IAM Dashboard.
    
* On the left side, click on Users, then click Add users.
    
* Choose a username you like (e.g., devops\_user).
    
* For AWS access type, check the boxes for Programmatic access (for CLI and SDK) and AWS Management Console access.
    
* Click Next: Permissions.
    
* Select Attach existing policies directly and find AmazonEC2FullAccess to give the new user full EC2 access.
    
* Click Next: Tags, then Next: Review, and Create user.
    
* Make sure to download or copy the access keys provided (you’ll need them later for CLI access).
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1739787102815/a6757dcf-c41b-4326-acac-0adddf3eef5f.png align="center")
    
* Before launching a instance we need to login to our IAM user account.
    
* Copy your ***"Console sign-in URL"*** and past it on your ***"private window".***
    
* After that ***"Sign in as IAM user"*** dashboard will open in that we have to give our IAM ***"User name"*** and ***"Console password"*** which your copied in your notepad and click on ***"Sign in".***
    
* After that it will ask to change ***"old password "*** to ***"new password"*** change it to your requirement and click on \*"\****Confirm password "*** change.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1739787281462/6bdf1458-6e75-45c3-9167-e8732b9255f7.png align="center")

Create a shell script to install Jenkins and Docker:

* Save this script as `install_jenkins_`[`docker.sh`](http://docker.sh) [and copy](http://docker.sh/) it to your instance.
    
* Run the script on the EC2 instance to install [Jenkins a](http://docker.sh/)nd Docker:
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1739789154368/cbd8c977-c961-41a7-8617-5f70cd2b580a.png align="center")
    

---

# **Task2:**

**In this task you need to prepare a devops team of avengers. Create 3 IAM users of avengers and assign them in devops groups with IAM policy.**

### **Create a DevOps Team of Avengers with IAM Policy**

#### Step 1: **Create IAM Users**

1. Go to the **IAM Dashboard**.
    
2. Click on **Users** &gt; **Add users**.
    
3. Add 3 users (e.g., `IronMan`, `CaptainAmerica`, `Thor`) and give them **Programmatic access**.
    
4. Click **Next: Permissions**.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1739850707438/949688cf-e700-4160-9f91-5a8bc4f865fa.png align="center")

#### **Step 2: Create a DevOps Group with IAM Policy**

1. In the IAM Dashboard, click on **User groups** &gt; **Create group**.
    
2. Name the group (e.g., `avenger-team`).
    
3. Attach a policy, like `AdministratorAccess`, or create a custom policy with limited permissions for DevOps tasks (e.g., access to EC2, S3).
    
4. Click **Create group**.
    

#### Step 3: **Assign Users to the Group**

1. Go to **Users**, click on each user (e.g., `IronMan`, `CaptainAmerica`, `Thor`), and select **Add user to group**.
    
2. Add them to the `avenger-team` group.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1739850826630/73d17f0c-91a5-4e6f-8ab6-28767ac07646.png align="center")

Now you have your DevOps Avengers team set up with IAM policies!

---

By the end of today, you'll have a better understanding of how to use AWS IAM and EC2 to manage permissions and automate tasks.

Stay consistent, and keep learning! 🌟
