Introduction
Welcome back to our journey into the world of AWS! Today, we're diving into the basics to lay a strong foundation for your cloud computing adventures. Buckle up, because we're about to embark on a thrilling ride through AWS services and configurations.
Task 1: What is AWS?
Amazon Web Services (AWS) is a comprehensive cloud computing platform offered by Amazon. It provides a wide range of services including computing power, storage, databases, machine learning, and more, all delivered over the internet. Essentially, AWS enables businesses to scale and grow without the need for costly infrastructure investments.
Task 2: What is IAM?
IAM stands for Identity and Access Management. It's a crucial component of AWS that allows you to manage access to your resources securely. With IAM, you can create and manage users, groups, and permissions to control who can access specific AWS resources and what actions they can perform.
Task 3: Creating an IAM User and Launching an EC2 Instance
Let's put IAM into action! First, we'll create an IAM user with a username of our choice and grant them access to EC2. Then, we'll launch a Linux instance using this IAM user and install Jenkins and Docker on it using a single shell script.
Login to the AWS Console with the root user go to IAM and select users from the menu.
Click on "Create user" and enter a username of your choice.
Select "Attach existing policies directly" and select the policy "AmazonEC2FullAccess".
Review and create
User created
Verify your root user name on the top right.
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.
Now we will connect the terminal and EC2 instance using ssh. So click on the Connect button and copy the ssh command.
connect to the server
Install jenkins and docker on your machine via 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 pkg.jenkins.io/debian-stable/jenkins.io-202.. | sudo tee
/usr/share/keyrings/jenkins-keyring.asc > /dev/null echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]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
Now we will give the permission of the shell script to the user. So run the below command.
Now, run the script file
Check docker and jenkins version
Task 4: Create 3 IAM users of Avengers and assign them to DevOps groups with the IAM policy
Now, it's time to assemble our DevOps dream team - the Avengers of cloud deployment! We'll create three IAM users representing our superheroes and assign them to a DevOps group. Along with that, we'll craft an IAM policy to define their access permissions.
3-IAM user created
Make the group name Avenger and select the user to add them.
if you need some permission to the group add them and click on create group.
In the "Attach Policy" step, search for and select the "AmazonEC2FullAccess", "AmazonS3FullAccess", and "AmazonRDSFullAccess" policies.
Verify the user group.
Conclusion
Today's journey has been nothing short of exhilarating! We've grasped the fundamentals of AWS, delved into IAM for secure access management, launched our first EC2 instance with Jenkins and Docker, and even formed our own DevOps Avengers squad.
Remember, the key to mastering AWS lies in practice and exploration. So, keep tinkering, experimenting, and pushing the boundaries of what you can achieve in the cloud. Until next time, happy cloud computing! ☁️✨🚀