AWS Notes and Resources

This document contains a collection of notes, links, and commands related to various AWS services.

AWS CLI Setup

  1. Install the AWS CLI on your local machine.
  2. Configure the CLI with your credentials by running:
    aws configure
    

    You will be prompted to enter your AWS Access Key ID, Secret Access Key, default region, and output format.

AWS Services Overview

This is a list of AWS services that have been used or explored:

  • Compute:
    • EC2 (Elastic Compute Cloud)
    • ECS (Elastic Container Service)
    • ECR (Elastic Container Registry)
    • Lambda
  • Storage:
    • S3 (Simple Storage Service)
    • EBS (Elastic Block Store)
  • Database:
    • DynamoDB
  • Networking & Content Delivery:
    • VPC (Virtual Private Cloud)
    • Route 53 / CloudMap
    • CloudFront
    • Application Load Balancer (ALB)
  • Developer Tools:
    • CodeCommit (Git repository)
    • CodeDeploy
  • Management & Governance:
    • CloudWatch (Monitoring and Logging)
    • IAM (Identity and Access Management) - Policies, Roles
  • Frontend & Mobile:
    • Amplify
    • Cognito

Tutorials and Guides

Here are links to tutorials that have been implemented or are worth exploring.

Implemented

Troubleshooting

AWS Policy Generator

A useful tool for creating IAM policies: AWS Policy Generator

ECR Docker Login Error

Error: Cannot perform an interactive login from a non TTY device

This can happen when piping the password to docker login.

Incorrect Command:

aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin <account_id>.dkr.ecr.ap-south-1.amazonaws.com

Correct Command: Use command substitution instead of a pipe.

docker login -u AWS -p $(aws ecr get-login-password --region <your-region>) <account_id>.dkr.ecr.<your-region>.amazonaws.com

Example:

docker login -u AWS -p $(aws ecr get-login-password --region ap-south-1) 759921771567.dkr.ecr.ap-south-1.amazonaws.com