AWS CodeCommit
Managed Git Repositories
Basics of Version Control
Version control is a system that records changes to a file or set of files over time so that you can
recall specific versions later.
knowledge portal
Distributed Version Control Systems
Git is free and open source software for distributed version control.
knowledge portal
AWS CodeCommit
AWS CodeCommit is a managed source control service that hosts private Git repositories.
knowledge portal
AWS Code Build
Let’s Build Software
Software Build Process
When we write code on various languages like Java, C and others, we need to compile to
code.
The output of the compilation is the binary that is executable.
#include <stdio.h>
int main() {
printf("Hello!"); Compiler
return 0;
}
knowledge portal
Overview of AWS CodeBuild
AWS CodeBuild is a fully managed continuous integration service that compiles source code,
runs tests, and produces software packages that are ready to deploy.
Compile
mycode {}
Sample Code
Output Build
AWS CodeBuild
knowledge portal
AWS CodeDeploy
Let’s Deploy Software
CodeBuildWorkflow
AWS CodeBuild compiles the application and uploads the artifacts to S3 bucket.
Compile
mycode {}
Sample Code
S3
AWS CodeBuild
knowledge portal
Overview of CodeDeploy
AWS CodeDeploy is a managed deployment service that automates software deployments to
a variety of compute services such as Amazon EC2, Fargate, Lambda and others.
Deploy
S3 Code Deploy
knowledge portal
Practical Steps
1. Create IAM Role for CodeDeploy with S3ReadOnly Access.
2. Create IAM Role for EC2 with S3ReadOnlyAccess
3. Launch EC2 Instance with Appropriate Role.
4. Install CodeDeploy Agent in EC2
5. Configure CodeDeploy Service.
knowledge portal
Code Pipeline
Automating Deployments
Current Setup
At this stage, we have the pipeline setup using Code Commit, Code Build and CodeDeploy
Challenge: The Entire Process is Manual.
EC2
S3 Code Deploy
AWS CodeCommit AWS CodeBuild
knowledge portal
Overview of Code Pipeline
AWS Codepipeline is a continuous delivery service to automate steps required to release
the software.
It allows us to launch the entire continuous delivery toolchain in minutes, allowing
releasing code faster.
Code Commit Code Build Code Deploy
knowledge portal
Important Pointer - Code Pipeline
Codepipeline automatically triggers your pipeline whenever there is a commit in the
source repository.
● Output artifact is ingested into input artifact to the Build stage.
● Output artifact from build stage (build) acts as input to the deploy stage.
knowledge portal
AWS CodeStar
It’s just awesome!
Use-Case: Building CI/CD Pipeline
To build CI/CD pipeline, we need to configure and integrate many services like AWS
CodeCommit, CodeDeploy, CodePipeline and others.
knowledge portal
Overview of Code Star
AWS Code Star provides a unified interface to quickly develop, build and deploy
application on AWS.
It allows us to launch entire continuous delivery toolchain in minutes, allowing releasing
code faster.
Code Star
Code Deploy 3rd Party tools
Code Commit Code Build
knowledge portal
Introduction to Docker
Build once, use anywhere
Installation of Software Workflow
Download the installer
Run the installer
Error Message During Installation
Troubleshoot the Issue
Re-Run the Installer
Get another error
knowledge portal
What is Docker Trying to Achieve?
Windows
Software
Linux
MAC
knowledge portal
What is Docker Trying to Achieve?
Windows
Software
Linux
Docker Container
MAC
knowledge portal
Introduction
Docker is an open platform, once we build a docker container, we can run it anywhere, say
it windows, linux, mac whether on laptop, data center or in cloud.
It follows the build once, run anywhere approach.
knowledge portal
Containers vs Virtual Machines
Virtual Machine contains entire Operating System.
Container uses the resource of the host operating system
knowledge portal
Container Orchestration
Build once, use anywhere
Getting Started
Container orchestration is all about managing the life cycles of containers, especially in
large, dynamic environments.
Web Server Web Server Web Server
App Server App Server
VM 1 VM 2 VM 3
knowledge portal
Requirement: Minimum of 2 web-server should be running all the time.
Web Server
Web Server
VM 1 VM 2 VM 3
knowledge portal
Importance of Container Orchestration
Container Orchestration can be used to perform lot of tasks, some of them includes:
● Provisioning and deployment of containers
● Scaling up or removing containers to spread application load evenly
● Movement of containers from one host to another if there is a shortage of resources
● Load balancing of service discovery between containers
● Health monitoring of containers and hosts
knowledge portal
Container Orchestration Solutions
There are many container orchestration solutions which are available, some of the popular
ones include:
● Docker Swarm
● Kubernetes
● Apache Mesos
● Elastic Container Service (AWS ECS)
There are also various container orchestration platforms available like EKS.
knowledge portal
Container Orchestration in AWS
Choosing Right Orchestrator
Container Orchestration in AWS
There are two primary services that are extensively used for container orchestration use-cases.
Container Orchestration
Elastic Container Service Elastic Kubernetes Service
knowledge portal
Important Difference
Pointers AWS EKS AWS ECS
Open-Source Yes No
Complexity More Complex Less Complex
Community Support More Less
knowledge portal
Choosing Right Orchestrator
If you plan to work exclusively on AWS, you should choose ECS as it offers more in-depth AWS
integration than Amazon EKS.
Organizations with limited expertise and insufficient resources to invest in learning Kubernetes
can go with ECS.
If you plan to deploy containers across multiple platforms, you can choose EKS.
knowledge portal
Elastic Container Registry (ECR)
Storing Container Images
Understanding with Analogy
Google Play is an online store where people go to find their favorite apps, games, movies,
TV shows, books, and mor
Android
Android
knowledge portal
Importance of Container Registry
Container Registry is a single place for your team to manage Docker images.
Whenever you launch a Docker Container, the associated image is pulled from Registry.
knowledge portal
Basics of ECR
Amazon ECR is a fully managed container registry for storing Docker Images.
Docker Image 1
docker pull
Docker Image 2
ECR
knowledge portal
AWS Fargate
Serverless Compute
Basic Approach
In traditional approach, there is a need to create set of EC2 instances where containers can run.
Challenges: Define and Deploy EC2, Security of EC2, Manage EC2
Container 1
Container Orchestrator
Container 2
knowledge portal
Serverless Approach
In the serverless approach, we do not have to worry about provisioning and managing EC2
AWS Fargate is a serverless, pay-as-you-go compute engine that lets you focus on building
applications without managing servers
Container Orchestrator
AWS Fargate
knowledge portal
AWS Service Catalog
Standardized Stack
Understanding the Workflow
AWS Service Catalog enables organizations to create and manage catalogs of IT services
that are approved for use on AWS.
Launch
Development ENV
t2.micro Database
Production ENV
Service Catalog Products
knowledge portal
AppStream 2.0
Interesting Service
Getting Started
AppStream 2.0 allows us to centrally manage our desktop application and securely deliver them
to any computer.
Sample Use-Case:
Software vendors can use AppStream 2.0 to deliver trials, demos, and training for their
applications with no downloads or installations.
knowledge portal
Amazon Comprehend
ML to Analyze Text
Simple Use-Case
There are 100 customer representatives working in a call center.
All the conversation is recorded into text (speech to text converter)
Management wants to know the overall sentiment of conversation (positive/negative).
knowledge portal
Amazon Comprehend
Amazon Comprehend is a natural-language processing (NLP) service that uses machine learning
to uncover valuable insights and connections in text.
Analysis
Text 1
Positive Sentiment
Text 2
Text 3 PII Data
English Language
Comprehend
knowledge portal
Amazon Comprehend - Medical
Amazon Comprehend Medical is a HIPAA-eligible NLP service that uses machine learning to
understand and extract health data from medical text, such as prescriptions, procedures, or
diagnoses.
knowledge portal
Amazon Lightsail
Let’s Sail
Explore Pricing of a Virtual Machine
Checking the cost of a 1 GB RAM Instance with 1 vCPU
Cost: $6
Cost: $11
knowledge portal
Why EC2 is Expensive?
Amazon EC2 is complex and provides wide set of features.
Amazon EC2 is part of VPC and organization can achieve wide variety of complex use-cases.
Tight integration with other AWS services.
knowledge portal
Basics of Lightsail
Amazon Lightsail offers easy-to-use virtual private server (VPS) instances, containers, storage,
databases, and more at a cost-effective monthly price.
Use this if you need a simple VM with basic functionality.
knowledge portal