DevOps (Day-39): AWS and IAM Basics

DevOps (Day-39): AWS and IAM Basics

ยท

3 min read

AWS

๐Ÿ”‘ AWS is a cloud computing platform that offers a wide range of services to help organizations build, deploy, and manage their applications and infrastructure.

๐Ÿ”‘ AWS services can be used to host websites, run applications, store and process data, manage databases, and more.

๐Ÿ”‘ AWS offers a pay-as-you-go pricing model, allowing organizations to only pay for the resources they use and avoid upfront costs.

๐Ÿ”‘ AWS provides a high level of scalability, enabling organizations to quickly scale their infrastructure up or down based on changing demands.

User Data in AWS

๐Ÿš€ User data in AWS refers to the script or data that can be passed to an Amazon Elastic Compute Cloud (EC2) instance when it is launched.

๐Ÿš€ User data can be used to perform various tasks such as installing software, configuring the instance, and setting up applications.

๐Ÿš€ User data can be passed to an EC2 instance in different ways, including providing a script during the instance launch or by specifying an S3 bucket where the data is stored.

๐Ÿš€ User data can be useful in automating the deployment of instances, reducing the time and effort required to set up instances manually.

๐Ÿš€ User data can also be used to set up instances to perform specific tasks, such as running web servers, databases, or other types of applications.

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.

Difference between an IAM User and Role in AWS | Blog | Adroit ...

Task 1: Configure user data in AWS

Aim: - Launch EC2 instance with already installed Jenkins on it. Once the server shows up in the console, hit the IP address in the browser and your Jenkins page should be visible.

  1. Navigate to the AWS console and launch a new instance.

  2. Provide suitable key pairs and security groups.

  3. Select the advanced settings on the instance creation page.

  4. Navigate to the User-data section and write a shell script to install Jeknins on the server.

  5. Include the port 8080 which is the Jenkins default port in the security group of the server.

  6. Start the EC2 instance and using the public IP access the URL through port 8080.

  7. YOu can see Jenkins would be running now.

Task2: IAM Roles

๐Ÿ’ก IAM roles in AWS are a way to grant permissions to AWS services and resources without the need for access keys or credentials.

๐Ÿ’ก IAM roles provide temporary security credentials that can be assumed by trusted entities, such as AWS services or users in other AWS accounts.

๐Ÿ’ก IAM roles can be used to provide permissions to perform specific tasks, such as accessing S3 buckets, launching EC2 instances, or managing DynamoDB tables.

๐Ÿ’ก IAM roles can be assigned to AWS resources, such as EC2 instances or Lambda functions, to grant them access to other AWS services.

๐Ÿ’ก IAM roles can help improve the security and manageability of AWS resources by reducing the need for permanent access keys and enabling granular permissions.

Task Aim:- Create three Roles named: DevOps-User, Test-User and Admin:

Navigate to the IAM console in AWS and go to roles.

Select the EC2 option on the page:

Provide specific permission as needed for the roles you are creating.

Create a DevOps-User now.

Then create a Test-User.

Then create a Admin user:

Now you can create a User and Assign roles:

ย