✨Day 36: Easy Guide to AWS IAM, S3 Bucket, and AWS CLI

✨Day 36: Easy Guide to AWS IAM, S3 Bucket, and AWS CLI

✨Day 36: Easy Guide to AWS IAM, S3 Bucket, and AWS CLI

✅What is IAM in AWS?

Brahada Srinivas on LinkedIn: #aws #amazon #guide #cloud #amazonwebservices

Imagine you're the boss of a big company, and you need to give different employees different levels of access to your office. AWS Identity and Access Management (IAM) works similarly for your online resources:

  • Users: These are your employees (or applications) who need access to your AWS resources.

  • Groups: Think of groups as departments in your company. You can assign the same permissions to everyone in a group.

  • Roles: These are like temporary badges you give to employees or services when they need to perform specific tasks.

  • Policies: These are the rules that define who can do what. It's like setting permissions for each person or group.

✅What is an S3 Bucket in AWS?

Understanding AWS S3 Storage Types

Think of an S3 bucket like a super-secure online storage box. You can store all kinds of files (documents, photos, videos, etc.) in this bucket, and you can control who gets to see or use these files.

✅What is AWS CLI?

The AWS Command Line Interface (CLI) is like a remote control for managing your AWS resources. Instead of clicking around a website, you can type commands on your computer to control everything.


✅Tasks

Task 1: Setting Up AWS IAM for a New Team Member and Creating a Private S3 Bucket

  1. Create a User:

    • Log in to AWS and go to the IAM service.

    • Click "Add user" and create a user named xyz. Give Alex access to the AWS Management Console and programmatic access.

  1. Create a Group and Attach Policies:

    • Make a new group called "MonitoringAndStorageManagement".

    • Add policies to this group that allow access to necessary resources (like full access to S3 and read-only access to CloudWatch).

  2. Add user to the Group:

    • Add the user to the "MonitoringAndStorageManagement" group.
  3. Create an S3 Bucket:

    • Go to the AWS website and log in.

    • Find the S3 service and click "Create bucket".

    • Follow the steps to make a new bucket, making sure it's private so only you can access it.

  1. Create Access Key:

    • Go to the IAM service in AWS.

    • Click on the "Users" and "select the user" for which we want to create an access key.

    • Go to the "Security Credentials" and Select "Create access key".

    • Now select as Command-line interface

    • Now select as Command-line interface

You will get the access keys for the user:

✅Task 2: Configure AWS CLI on Ubuntu

  1. Download the AWS CLI Installer:

    • Go to the official AWS CLI Website.

    • Download the AWS CLI for LINUX Ubuntu users.

Run this following commands:

  1.   curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    
  2. Unzip the Installer:

    • Install unzip if it's not already installed:
    sudo apt update
    sudo apt install unzip
  • Unzip the downloaded file:
    unzip awscliv2.zip
  1. Run the Installer:

    • Run the install script:
    sudo ./aws/install
  1. Verify the Installation:

    • Check the AWS CLI version:
    aws --version
  1. Configure AWS CLI:

    • In your terminal, type:
    aws configure
  • Enter the Access Key ID and Secret Access Key when prompted. Also, enter your preferred region (e.g., us-east-1) and output format (e.g., json).


By following these steps, you’ll understand how to manage access to your AWS resources, store files securely, and use command-line tools to control your AWS environment.

Happy learning! 😊