Here's a more in-depth guide with examples of setting up IAM and EC2 services along with real-world applications.
1. Setting Up IAM (Identity and Access Management)
IAM controls user access and permissions, making sure authorized people and services can use your AWS resources.
Example Scenario: Creating an IAM User with Programmatic Access for DevopsPratik
Let's say you need to create an IAM user for your CI/CD pipeline to deploy applications.
Step 1: Accessing IAM in the AWS Management Console
Sign in to your AWS Management Console.
Look up "IAM" in the search box and select "IAM".
Step 2: Making an IAM User
On the IAM main screen, pick "Users" from the menu on the left.
Hit "Add User".
Type in a "User name": DevopsPratik
Pick the "Access type":
- Turn on "Programmatic access" so this user can work with the CLI, SDK, or APIs.
Hit "Next: Permissions".
Step 3: Giving the User Permissions
Choose "Attach existing policies ".
Look for and pick the policy AdministratorAccess (or make a custom policy with more specific permissions).
Hit Next: Tags (if you want) then hit Next: Review and Create User.
Step 4: Get Access by link
After you make the user, you'll see a chance to get the access link
Understanding the IAM User Sign-In Screen
Account ID (12 digits) or Account Alias:
This field requires your AWS Account ID or Account Alias. The Account ID is a unique 12-digit number associated with your AWS account. In this example, the Account ID is
058264508057
.An account alias is a custom name that can be set up to make it easier to log in, rather than using the long numerical ID.
IAM User Name:
Enter the username of the IAM user. In this example, the username is
DevopsPratik
.This username is created during the IAM user setup process.
Password:
Pratik@2024
- Enter the password associated with the IAM user. The password was generated or set during the IAM user creation process. In this example, the password is masked for security reasons.
Remember This Account (Checkbox):
- You can select this option to save your account information for future logins, reducing the need to enter the Account ID and username each time.
Sign In Button:
- Click this button to log in to the AWS Management Console using the provided credentials.
Sign in Using Root User Email (Link):
- If you need to sign in as the root user (which has full account access), you can use this link. The root user login requires an email address and password, which differ from IAM credentials.
Forgot Password? (Link):
- If you’ve forgotten your password, this link allows you to reset it, provided you have the necessary recovery information.
After the user is created, you’ll see the login credentials:
Username:
DevopsPratik
Password:
Pratik@2024
Console Sign-In URL: https://058264508057.signin.aws.amazon.com/console
-
Successfully login as a I AM user
Pratik Lahamge
LinkedIn | Portfolio | GitHub | Email