Skip to the content.

AWS Automation

This is not an exhaustive documentation of all the existing AWS Services. These are summarized notes for the AWS Certifications.
To see the complete documentation, please go to: AWS documentation

AWS CLI: Command Line Interface

Add user credentials locally using this command:

aws configure  

If you are using multiple AWS accounts, you can add custom profiles with seperate credentials using this command:

aws configure --profile {my-other-aws-account}  

If you you’d like to execute commands on a specific profile, example:

aws s3 ls --profile {my-other-aws-account}

``

If you don’t specify the aws profile, the commands will be executed to your default profile

AWS CLI on EC2

CLI STS Decode Errors

Back to the top

SDK: Software Development Kit

If you want to perform actions on AWS directly from your application’s code without using a CLI, you can use an SDK.

Official SDKs:

Key points

SDK Credentials Security

Exponential Backoff

|| |-|

Back to the top

AWS Elastic Beanstalk

AWS Elastic Beanstalk is a developer centric view of deploying application on AWS.

Three architecture models

Three different components

Support for many platforms

Elastic Beanstalk Under the Hood

Deployment Modes

Single Instance deployment

High Availability with Load Balancer

|| |-|

Back to the top

Deployment Updates

All at once

Rolling

Rolling with additional batches

Immutable

Blue / Green Deployment

Back to the top

Elastic Beanstalk CLI

Elastic Beanstalk Lifecycle Policy

Elastic Beanstalk Extensions

Back to the top

Elastic Beanstalk Cloning and Migrations

Migrate Load Balancer

Decouple RDS from the EB stack

Back to the top

Elastic Beanstalk and Docker

Multi Docker Container

Back to the top

Elastic Beanstalk and HTTPS

Redirect HTTP to HTTPS

Back to the top

AWS CloudFormation

CloudFormation is a declarative way of outlining your AWS Infrastructure, for any resources (most of them are supported).

For example, within a CloudFormation template, you want to:

Benefits of CloudFormation

How CloudFormation works

Deploying CloudFormation templates

Manual way

Automated way

CloudFormation Stacks and StackSets

CloudFormation Building Blocks

CloudFormation Resources

Analysis of CloudFormation Templates

FAQ for resources

CloudFormation Parameters

How to reference a parameter

CloudFormation Mappings

When would you use Mapping vs. Parameters?

CloudFormation Outputs

Cross Stack Reference

CloudFormation Conditions

Defining Conditions

CloudFormation Transforms

CloudFormation Intrinsic Functions

CloudFormation Rollbacks

Stack Creation Fail

Stack Update Fails

Continuous Integration / Continuous Delivery - Basics

Continuous Integration

Continuous Delivery

Why use CICD?

AWS Services for CICD

AWS CodeCommit

AWS CodeCommit is a secure, highly scalable, fully managed source control service that hosts private Git repositories.

Version Control This is the ability to understand changes that happened to the code over time (and possibly roll back)

Github vs. CodeCommit

Similarities

Differences

AWS CodeCommit Security

Authentication with Git

Authorization with Git

Encryption

Cross Account access

AWS CodeCommit Notifications

You can trigger notifications in CodeCommit using AWS SNS(Simple Notification Service) or AWS Lambda or AWS CloudWatch Event Rules

Use cases for notifications SNS / AWS Lambda notifications

Use cases for CloudWatch Event Rules

AWS CodeBuild

AWS CodeBuild is a fully managed continuous integration service that compiles source code, runs tests, and produces ready-to-deploy software packages.

Overview

CodeBuild Supported Environments

How does CodeBuild work?

|| |-|

CodeBuild BuildSpec

CodeBuild Local Build

AWS CodeDeploy

AWS CodeDeploy is a fully managed deployment service that automates software deployments to various compute services, such as Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), AWS Lambda, and your on-premises servers. Use CodeDeploy to automate software deployments, eliminating the need for error-prone manual operations.

|| |-|

CodeDeploy - How it works

CodeDeploy - Additional information

CodeDeploy - Primary Components

CodeDeploy AppSpec

CodeDeploy Deployment Config

Configs

Failures

Deployment Targets

Deployment types

In place deployment

|| |-|

Blue / Green Deployment

|| |-|

CodeDeploy to EC2

CodeDeploy to ASG

In place updates

Blue / green deployment

CodeDeploy Rollbacks

AWS CodePipeline

AWS CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates.

CodePipeline Artifacts

When you first use the CodePipeline console in a region to create a pipeline, CodePipeline automatically generates this S3 bucket in the AWS region

|| |-|

CodePipeline Troubleshooting