Prerequisites

Preparation Steps

ℹ️ Information: Before starting the workshop, you need to complete the following basic setup steps to ensure your AWS environment is properly configured.

  1. Create an IAM User Group to manage permissions.

    • Access Identity and Access Management (IAM) Prerequiste

    • Click on User group.

    • Select Create group.

    Prerequiste

    • Enter a name for the User group.
    • Scroll down to Attach permissions policies, select AdministratorAccess.
    • Then select Create group.

    Prerequiste

    Prerequiste

    • Confirm the User group has been created

    Prerequiste

  2. Create an IAM User with appropriate access permissions.

    • Access User, select Create User.
    • Name it aws-cli-user. Select Next
    • Add user to group, select the User group just created.
    • Select Next and create user.

    Prerequiste

    Prerequiste

    Prerequiste

    Prerequiste

  3. Create AWS Access Key to use with AWS CLI or SDK.

    • Select the User just created.
    • Scroll down and select Security credentials, select Create Access Key.
    • Select Command Line Interface (CLI).

    Prerequiste

    Prerequiste

    Prerequiste

    Prerequiste

    • Check the I understand… box, select Next.
    • Enter a description and select Create access key.

    Prerequiste

    Prerequiste

    • After getting the Access key and Secret access key, please copy them to notepad or download the .csv file for use in later steps.

    Prerequiste

  4. Similarly, create another user named devops, add that user to group aws-cli and repeat the above steps.

    Prerequiste

    Prerequiste

    Prerequiste

    Prerequiste

  5. Launch an EC2 Instance and set up SSH access to manage through AWS CLI.

    • Access EC2.
    • Select Launch instance.
    • Name the instance aws-cli-instance.

    Prerequiste

    Prerequiste

    Prerequiste

    • Select Amazon Linux 2023 kernel-6.1 AMI.
    • Select t3.micro.
    • Next, proceed to create Key pair.

    Prerequiste

    Prerequiste

    • Enter name aws-cli-keypair.
    • Select RSA.
    • Format .pem.
    • Click Create key pair.

    Prerequiste

    • Ensure SSH access is enabled to manage through AWS CLI.
    • Then select Launch instance.

    Prerequiste

    • Then wait 2 minutes for the instance to check passed.
    • Save the Public IPv4 address information.

    Prerequiste

  6. To perform this lab, we will use MobaXterm, a versatile terminal software used to connect and manage remote servers through protocols such as SSH, SFTP, RDP,….

    • Download MobaXterm HERE
  7. After successfully downloading MobaXterm, proceed with the following steps to SSH into the EC2 instance:

    • Select Session -> Select SSH.
    • In Remote host enter the IPv4 address, in Username enter ec2-user
    • Select Advanced SSH settings, check Use private key, select the keypair file just downloaded.
    • Click OK to connect

    Prerequiste

    • Select Accept

    Prerequiste

    • Successfully connected

    Prerequiste

🔒 Security Note: Always follow the principle of least privilege when granting permissions to IAM Users and ensure you protect your AWS Access Keys.

💡 Pro Tip: Use AWS CloudShell to avoid having to install AWS CLI on your personal computer and to access a pre-authenticated AWS command-line environment.