Day 38 Task: Getting Started with AWS Basics

Day 38 Task: Getting Started with AWS Basics

ยท

3 min read

๐Ÿ”ถ AWS:

Amazon Web Services is one of the most popular Cloud Providers that has a free tier for students and Cloud enthusiasts for their Hands-on while learning (Create your free account today to explore more on it).

Read from here

๐Ÿ”ถ IAM:

AWS Identity and Access Management (IAM) is a web service that helps you securely control access to AWS resources. With IAM, you can centrally manage permissions that control which AWS resources users can access. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources. Read from here

To get to know IAM more deeply Click Here!!

๐Ÿ”ถ Task1: Create an IAM user with the username of your wish and grant EC2 Access

Create an IAM user with the username of your 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 a single Shell Script.

The steps to create an IAM user grant EC2 Access are as follows:

1. Login to the AWS Console with the root user go to IAM and select users from the menu.

  1. Enter to create a new user name and provide user access to the AWS management console, select I want to create an IAM user.

  2. Set permission select Attach policies directly and On permission policies search for AmanzonEC2FullAccess.

  3. Review and create a user.

  4. Now Login AWS console with Your IAM user.

  5. Verify your root user name on the top right.

  6. Now Launch the new EC2 instance from the root user.

  7. Now Connect the instance and install Jenkins docker as a part of our Task via a single Shell Script.

     #!/bin/bash
     #Step-1 Install Java
     #First of all Update your system
     sudo apt update
     #Install java
     sudo apt install openjdk-11-jre
     #Validate Installation
     java -version
    
     #Step-2 Now Install Jenkins
     #Just copy these commands and paste them onto your terminal.
     curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
       /usr/share/keyrings/jenkins-keyring.asc > /dev/null
     echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
       https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
       /etc/apt/sources.list.d/jenkins.list > /dev/null
    
     sudo apt-get update
     sudo apt-get install jenkins
    
     #Step-3 Start jenkins
     sudo systemctl enable jenkins
     sudo systemctl start jenkins
     sudo systemctl status jenkins
    
     #Step-4 Now Install Docker
     sudo apt update
     sudo apt install docker.io -y
     sudo systemctl start docker
    

  8. Now run the shell script by using ./shell-name.sh

     #Give the permission to the user
     chmod +x root.sh 
     #Now run the script file
     ./root.sh
    
  9. Verify your Docker and Jenkins installation.

๐Ÿ”ถ Task2: Create 3 IAM users of Avengers and assign them to DevOps groups with the IAM policy

In this task, you need to prepare a DevOps team of Avengers. Create 3 IAM users of Avengers and assign them to DevOps groups with the IAM policy.

1. Login to the AWS Console with the root user go to IAM select a user from the menu and create 3 users for your Avenger's group.

  1. Make the group name Avenger and select the user to add them.

  1. If you need some permission to the group add them and click on create group.

  2. Verify the user group.


Happy Learning :)

Stay in the loop with my latest insights and articles on cloud โ˜๏ธ and DevOps โ™พ๏ธ by following me on Hashnode, LinkedIn (https://www.linkedin.com/in/chandreshpatle28/), and GitHub (https://github.com/Chandreshpatle28).

Thank you for reading! Your support means the world to me. Let's keep learning, growing, and making a positive impact in the tech world together.

#Git #Linux Devops #Devopscommunity #90daysofdevopschallenge #python #docker #Jenkins #Kubernetes #AWS

Did you find this article valuable?

Support Chandresh Patle's Blog by becoming a sponsor. Any amount is appreciated!

ย