What Is Cloud Computing?: Demand Delivery of Computing Power, DB Storage, Apps, and More. This Means That We Pay
What Is Cloud Computing?: Demand Delivery of Computing Power, DB Storage, Apps, and More. This Means That We Pay
What Is Cloud Computing?: Demand Delivery of Computing Power, DB Storage, Apps, and More. This Means That We Pay
In the past we had on premise servers. These servers would sit in a datacentre, the issue with
the on-premises servers is that they require maintenance, they cannot scale, and they require a
lot of work.
We can replace on-premises servers with cloud server. The cloud servers allow us to have on-
demand delivery of computing power, DB storage, apps, and more. This means that we pay
as we go and pay only for what we’ve asked for.
We can create an identical server of what we have on-prem, we can adjust the amount of CPU
cores, the amount of RAM, and so on. We will get the cloud server instantly. As we can
access everything through an interface.
1. Private cloud:
This cloud allows complete control over the resources, but its private and used within
a single organization and its not exposed to the public. It’s used to secure sensitive
apps.
2. Public cloud:
this cloud is owed and operated by 3rd party cloud service and provided over the
internet. (AWS, GCP and Azure are examples of public clouds)
3. Hybrid cloud:
this cloud is a combination of on-prem servers and services from the cloud, which
allows control over sensitive assets in the private infra.
1. On-demand self service – use resources without human interaction from the provider.
2. Broad network access – resources can be accesses over the network, and by different
client platforms.
3. Multi-tenancy and resource pooling – the physical server are accesses by everyone,
but each infra is secure and private.
4. Rapid elasticity and scalability – scale on demand and dispose resources when
needed.
5. Measured service – usage is measured, and we pay per what we have used.
1. Trade capital expenses for operational expenses – we pay for what we use, we don’t
need hardware, we just rent it from AWS.
2. Benefit from massive economies of scale.
3. Stop guessing capacity – since we know how much we need, there is no need to
guess.
4. Increased speed and agility.
5. No money spent on running and maintaining data centres.
6. Go global in minutes.
Types of cloud computing:
Aws Cloud:
AWS cloud infra is built using different regions, and the region spread is global.
A region is a cluster of datacenters.
AWS points of presence (Edge Locations) – These allow to deliver content to users with
low latency.
IAM – Identity and Access Management
Introduction
The IAM is a global service, in this service, we can create users and assign them to groups.
When we first created our AWS account,we created a root account, the root account is created
by default, and it should not be used and shared.
What we should do is to create users and assign them into groups.
Groups can contain only users, and not groups.
Note that a user doesn’t have to be assigned into a group, and a user can be assigned into
multiple groups.
In IAM we can set permissions to different groups/users. To set for a user/group a permission
we need to create a JSON file called policy.
In AWS we want to give users and groups the least number of permissions needed.
When we create users, we can connect to AWS through root or through the IAM user that we
have created.
IAM Policies
We can create policies and attach them to groups; these policies declare what permission the
users will have.
So, if we create a policy to a group, all users that belong to that group will inherit that policy
permissions.
If a user doesn’t belong to group, it can still inherit from a policy (inline policy)
Consists of
• Version: policy language version, always include “2012-10-17”
• Id: an identifier for the policy (optional)
• Statement: one or more individual statements (required)
Statements consists of
• Sid: an identifier for the statement (optional)
• Effect: whether the statement allows or denies access (Allow, Deny)
• Principal: account/user/role to which this policy applied to
• Action: list of actions this policy allows or denies
• Resource: list of resources to which the actions applied to
• Condition: conditions for when this policy is in effect (optional)
IAM MFA
To protect users in AWS, we can define 2 mechanisms:
1. Create a password policy:
The password policy can set a minimum password length, to require specific chars, to
allow IAM users to change their own password, to require changing the password
after some time, to prevent password re-use, and so on.
2. MFA – Multi Factor Auth:
users have access to our AWS account and can change configs or delete resources.
Thats why we must protect our root and IAM users.
MFA is the combination of a password + security device that we own.
The main benefit of using MFA is if the password is stolen or hacked, the account is not
compromised, since the hacker also need the device to log in.
The AWS CLI is a CLI that allows us to interact with AWS services through the command
line.
In this CLI each command starts with the word keyword aws.
The AWS SDK is a software development kit, that is language-specific API, and it enables
access and management to AWS services through code. It is Embedded in the app, and
supports different programming languages, mobiles SDK, and IoT devices SDK.
To create Access Keys, we are going to the user, security credentials, and then create access
keys.
This will allow us to connect through a CLI with our credentials.
To configure the access keys on the cli run: aws configure
So, in other words, AWS is responsible for the infra, and we are responsible of how we use
the infra.
To summarize:
IAM role – role for a service that will use AWS.
IAM user – user created to use AWS with permissions.
IAM policy – a JSON file containing permissions.
EC2 – Elastic Compute Cloud
NOTE – We will want to create a budget, since we don’t want to spend money on
AWS services.
EC2 Basics
EC2 is an Elastic Compute Cloud service, which is user as Infra As a Service (IAAS).
Through EC2 We can:
Rent VMs (EC2 instances)
Store data on Vdrives (EBS)
Distribute load across machines (ELB)
Scale services using auto scaling group (ASG)
Naming Convention:
M5.2XLarge
M: instance class
5: generation
2XLARGE – size within the class.
Security Groups and Classic Ports
Security groups are the fundamental of network security in AWS.
The security groups are like firewalls, but only contains allow rules.
The security groups can reference by IP or by security group.
If create an EC2 instance, we can set what traffic will be able to go inbound (To the EC2),
and what traffic the EC2 can send to the internet (Outbound traffic).
The security groups can also regulate access to different ports of the instance and the IP
ranges.
The security groups can be attached to multiple instances, it is also locked down to a region /
VPC combination and does live “outside” the EC2 – so if traffic is blocked the EC2 instance
won’t see it.
It’s good to maintain one separate security group for SSH access.
If your application is not accessible (time out), then it’s a security group issue.
(a timeout is when the browser keep on trying to connect the instance)
If your application gives a “connection refused“ error, then it’s an application
error or it’s not launched.
By default:
• All inbound traffic is blocked.
• All outbound traffic is authorised.
If we would set an instance (1) with a security group that authorises 2 other security groups,
then when we initialize instances (2, 3) from the authorised security groups then the instances
(2,3) can access instance (1).
Important Ports:
• 22 = SSH (Secure Shell) - log into a Linux instance
• 21 = FTP (File Transfer Protocol) – upload files into a file share
• 22 = SFTP (Secure File Transfer Protocol) – upload files using SSH
• 80 = HTTP – access unsecured websites
• 443 = HTTPS – access secured websites
• 3389 = RDP (Remote Desktop Protocol) – log into a Windows instance
SSH
To connect to our EC2 instance machine, we need the SSH protocol to connect into it.
We can connect also via putty, or via EC2 Instance Connect, which only works on Amazon
Linux AMI (AMI = Amazon Machine Image).
To let the EC2 instance run command and get API calls by our name we need to do:
aws configure
BUT, THIS IS VERY DANGEROUS SINCE WE ADD OUR LOGIN AND PASSWORD
AND THEN SOMEONE CAN USE THE EC2 INSTANCE IN OUR NAME.
Instead, we must create a role and give it to the EC2 instance, so the instance can have the
least number of permissions.
To add a role to an EC2 instance, go to actions, security, modify IAM role.
To summarize:
EC2 User Data – script that runs only 1 time when we create the instance.
Security Group – like a firewall that states what will go in and out.
EC2 Instance Role – Link to IAM roles, and what permissions that EC2 has.
EC2 Instance Storage
EBS Volume
An EBS (Elastic Block Store) Volume is a network drive you can attach to your instances
while they run.
It allows instances to persist data, even after their termination. Which means that if we
would terminate an instance and have an EBS, we would still be able to move the data to
another instance, and the data would persist.
They can only be mounted to one instance at a time. And they are bound to a specific AZ. We
can think of them as a “network USB stick”.
Note that an EBS is a network drive and not a physical drive, so it uses the network to
communicate to the instance which could result in a bit of latency.
To move a volume across, we need to snapshot it. Also, we must provision the capacity.
(the configuration needs to be the size and the i/o operations/sec)
We can have instance with few EBS’s but, only 1 EBS connected to an instance.
Also, we can create an EBS but leave him unattached.
When we create an instance, it will have a root EBS attached to it. We can also attach more
EBS to the instance.
The delete on termination attribute controls the EBS behaviour when an EC2 instance is
terminated.
By default, the root EBS (which is created when we create the instance), is deleted – the
attribute is enabled.
By default, any other attached EBS volume is not deleted – the attribute is disabled.
This can be controlled by the AWS console / AWS CLI.
The use case for this can be to preserve the root volume when the instance is terminated, to
persist data.
Note that if we add an EBC volume, we also need to mount it to the instance.
EBS Snapshot
A snapshot is a backup of the EBS volume, which can be created at any point in time.
It is recommended to detach a volume and then take a snapshot, but we can also take a
snapshot without detaching.
We can copy snapshots across AZ or region.
AMI
The AMI is an Amazon Machine Image.
The AMI is a customization of an EC2 instance, and can include software, configs, OS,
monitoring tools and so on. It allows faster boot time since all the software is already pre-
packed.
The AMI is built for a specific region, but then can be copied across regions.
The EFS is highly available, scalable, expensive, where you pay per use, and not per total
capacity, since there is no capacity planning.
EBS VS EFS:
EBS Is available only in one AZ. Where EFS is available in multiple AZ at the same
time.
EFS Infrequent Access (EFS-IA): Move unused files to cheaper storage class.
This is a storage class that is cost-optimized for files that are not accessed everyday.
It gives up to 92% lower cost compared to standard EFS.
When we use EFS-IA, the EFS will move the files to EFS-IA based on the last time they were
accessed.
To enable EFS-IA we need a lifecycle policy, we can declare to EFS-IA to move files that are
not accessed for the last X days to EFS-IA
This is a fully managed, highly reliable and scalable Windows native shared filesystem,
which is built on windows file server.
This FSX supports SMB protocol and Windows NTFS. It is also integrated with Microsoft
active directory.
This allows connection from AWS or from on-prem infra.
This means that if we have 1 FSX on AZ1, and another FSX on AZ2, then we can connect to
the shared filesystem either from an instance or through SMB.
This is a fully managed, high-performance, scalable file storage for High Performance
Computing (HPC).
We can connect to this FSX either from a Linux server, or from EC2 instanced. Then, the data
is linked into an Amazon S3 Bucket.
ELB (Elastic Load Balancing) and ASG (Auto Scaling
Group)
Vertical scalability:
Horizontal scalability:
High availability usually goes hand in hand with horizontal scaling (if we add more, we need
to be at more places).
This means that if we run an app / system, we need to run in at least 2 AZ.
The goal of this is to survive a data centre loss. (so, in case 1 falls, we have another running).
Elasticity: once a system is scalable, we need to add some “auto-scaling” to the system, so it
the scale will be based on the load. This is “cloud-friendly”, we pay per use, and we match
the demand so we can optimize the cost.
Agility: new IT resources are only a click away, which we can reduce time to make those
resources available to us, from weeks to just minutes.
We can create our own load balancer, although it will cheaper, it will take more time and
effort to make, maintain, and integrate.
S3 is used for variety of things, from backup and storage to disaster recovery (in case a region
fails), to archive files. It is used in hybrid cloud storage, as application hosting platform, to
host media, and so in.
Buckets:
S3 Objects:
Objects (files) have a key, the key is the full path of the file:
S3://my-bucket-name/my_file.txt
If we nest a file under more files (not considered directories), then we have a prefix + the
object name:
S3://my-bucket-name/my_folder1/another_folder/my_file.txt
Objects have values, the values are the content of the body.
The value size is up to 5TB.
In case the value is greater then 5TB, then the “multi-part upload” option must be used.
The objects also have:
Metadata (key-value pairs of system or user metadata).
Tags (Unicode key-value pairs [up to 10]) – which is useful for security.
Version ID.
1
No uppercase, no underscores, not an up, must start with lowercase or number, not start with xn, not start end
with s3alias
S3 Security: Bucket Policy
Types of securities
S3 Bucket Polices
The example below gives access to everyone to view all the objects in the bucket.
1. Go to bucket permissions.
2. Untick the Block public access.
3. Then add policies.
Use cases:
• CRR – compliance, lower latency access, replication across accounts
• SRR – log aggregation, live replication between production and test accounts
Note – we can move object through classes manually, or using S3 Lifecycle configs, which
moves the objects automatically.
• 99.99% Availability
• Used for frequently accessed data
• Low latency and high throughput
• Sustain 2 concurrent facility failures
• Use Cases: Big Data analytics, mobile & gaming applications, content
distribution…
• For data that is less frequently accessed, but requires rapid access when
needed
• Lower cost than S3 Standard
S3 Intelligent-Tiering
Small monthly monitoring and auto-tiering fee
Moves objects automatically between Access Tiers based on usage
There are no retrieval charges in S3 Intelligent-Tiering
We can also move objects based on a Life Cycle rule, this rule will tell S3 to move objects
within a number of days to another tier.
S3 Encryption
Server-Side Encryption (default):
When the user uploads an object to the bucket, the bucket will encrypt the object after
receiving it.
Client-Side Encryption:
This encryption is done by the user before he uploads the object into the bucket.
IAM Access Analyzer for S3
This feature ensures that only intended people have access to the S3 bucket.
It works by analysing the bucket policy, the S3 ACLs, the S3 Access Point Polices and so on.
With this we can review permissions on our bucket.
Transferring data over the internet takes time as the file size grows.
There are also different challenges to transfer data:
The connectivity can be limited, the bandwidth can be limited, the network cost is high, the
bandwidth is shared, the connection is not always stable.
This works by AWS sending to the client a physical device, which the client loads the data
into. Then, the user client ships the physical device back to an AWS facility. There, the data is
imported and then exported to an S3 bucket.
Physical data transport solution: move TBs or PBs of data in or out of AWS
Alternative to moving data over the network (and paying network fees)
Pay per data transfer job
Provide block storage and Amazon S3-compatible object storage
Small, portable computing, anywhere, rugged & secure, withstands harsh environments
• Light (4.5 pounds, 2.1 kg)
Device used for edge computing, storage, and data transfer
• Snowcone – 8 TB of HDD Storage
• Snowcone SSD – 14 TB of SSD Storage
Use Snowcone where Snowball does not fit (space constrained environment)
Must provide your own battery / cables
Can be sent back to AWS offline, or connect it to internet and use AWS DataSync to send
data
AWS Snowmobile
These locations may have, Limited / no internet access, or Limited / no easy access to
computing power.
Eventually (if need be) we can ship back the device to AWS (for transferring data for
example)
All: Can run EC2 Instances & AWS Lambda functions (using AWS IoT Greengrass)
Long-term deployment options: 1 and 3 years discounted pricing
AWS OpsHub
Historically, to use Snow Family devices, you needed a CLI (Command Line Interface tool)
Today, you can use AWS OpsHub (a software you install on your computer / laptop) to
manage your Snow Family Device
• Unlocking and configuring single or clustered devices
• Transferring files
• Launching and managing instances running on Snow Family Devices
• Monitor device metrics (storage capacity, active instances on your device)
• Launch compatible AWS services on your devices (ex: Amazon EC2 instances, AWS
DataSync, Network File System (NFS))
Aws is pushing for “hybrid cloud”, part of the infra is on premises, and part of the infra is on
the cloud.
This can be due to either long cloud migrations, security requirements, compliance
requirements, IT strategy.
S3 is a proprietary storage technology (unlike EFS/NFS), we can choose how to expose the
S3 data on premises.
We can do it using AWS Storage Gateway.
When we use blocks of storage it can be Amazon EBS, EC2 Instance Store.
When we use file to store data it can be Amazon EFS (as we store files)
When we use store objects, we can use Amazon S3 and S3 Glacier.
When using AWS Storage Gateway, it bridges between on-prem data and cloud data in S3.
This hybrid storage service allows on-prem to use the AWS Cloud.
The use cases are:
Disaster recovery, backup and restore, tiered storage.
Summary
• Buckets vs Objects: global unique name, tied to a region
• S3 security: IAM policy, S3 Bucket Policy (public access), S3 Encryption
• S3 Websites: host a static website on Amazon S3
• S3 Versioning: multiple versions for files, prevent accidental deletes
• S3 Replication: same-region or cross-region, must enable versioning
• S3 Storage Classes: Standard, IA, 1Z-IA, Intelligent, Glacier (Instant, Flexible, Deep)
• Snow Family: import data onto S3 through a physical device, edge computing
• OpsHub: desktop application to manage Snow Family devices
• Storage Gateway: hybrid solution to extend on-premises storage to S3
Databases and Analytics
Databases Introduction
We can store data on disk (EFS, EBS, EC2 Instance Store, S3), but these can have limits.
Sometimes, we want to store the data in a DB.
In a DB we can structure the data, build indexes to query / search through the data in efficient
time, and to define relationships between datasets.
DBs are optimized for a purpose and come with different features, shapes and constrains.
Relational DB
NoSQL DB
Json is a JS Object Notation. And it is common form of data that fits into the NoSQL model.
The data can be nested, and the fields can change over time.
It supported types like arrays.
On the other hand, we can handle the DB on an EC2 instance, but we will need to handle
everything by our own.
RDS and Aurora Overview
RDS stands for Relational Database Service
It’s a managed DB service for DB use SQL as a query language.
It allows you to create databases in the cloud that are managed by AWS:
• Postgres
• MySQL
• MariaDB
• Oracle
• Microsoft SQL Server
• IBM DB2
• Aurora (AWS Proprietary database)
Amazon Aurora
The client connects to a Proxy Fleet that is managed by Aurora and the instances are created /
terminated depending on the usage, and they share the storage volume.
RDS Deployments Options:
Read Replicas, Multi-AZ
We can use Read Replicas to scale the read workload of the DB.
If we have a main DB that our application reads data from, we can add Read Replicas that
will distribute the reads and decrease the load on the main DB.
We can create up to 15 Read Replicas.
The data is only written to the main DB.
We can also use multi-AZ as a failover in case an AZ is in outage, this allows high
availability.
The data is only read and written to the main DB.
We can have only 1 AZ as a failover.
Multi Region
ElastiCache Overview
ElastiCache used to get managed Redis or Memcached.
The caches are in-memory DB with high performance, and low latency.
This helps to reduce load off DB for read intensive workloads, since the data is written in-
memory, there is no need to read from the DB each time, which will improve performance.
When creating a DynamoDB, we create only the table, and not the DB, since its
serverless.
Also note that we cannot add tables to merge between or creation relationship.
2
This means that we do not need to provision anything, there is no server, hence it’s serverless.
Redshift Overview
Redshift is based on PostgreSQL, but its not used for OLTP (Online Transaction
Processing).
Redshift is OLAP (online analytical processing [analytics and data warehousing])
We load the data every hour and not every second.
The performance is better in 10X then other data warehouses, and it can scale up to PB.
Redshift Serverless
This can be enabled, and then we connect Amazon Redshift Query Editor, which connects to
Amazon Redshift Serverless (this will run queries and automatically provision and scale
capacity based on workloads), then, we will pay only for the compute time and storage used.
Amazon EMR
EMR = Elastic Map Reduce
This helps creating Hadoop Clusters (for big data) to analyse and process vast amount of
data.
The clusters can be made of hundreds of EC2 instances.
EMR takes care of all the provisioning and configs, it has auto-scaling and integrated with
Spot instances.
The use case for this is to process data, the do ML, web indexing, big data...
Amazon Athena
This is a serverless query service to perform analytics against S3 objects.
It uses standard SQL language to query the files.
QuickSight Overview
Serverless ML powered BI service to create interactive dashboards.
It is a fast, automatically scalable, embeddable with per session pricing.
DocumentDB Overview
DocumentDB is the same for MongoDB (NoSQL DB).
MongoDB is used to store, query, and index JSON data
Similar “deployment concepts” as Aurora
Fully Managed, highly available with replication across 3 AZ
DocumentDB storage automatically grows in increments of 10GB
Automatically scales to workloads with millions of requests per seconds
Neptune Overview
Fully managed graph database
Highly available across 3 AZ, with up to 15 read replicas
Build and run applications working with highly connected datasets – optimized for these
complex and hard queries
Can store up to billions of relations and query the graph with milliseconds latency
Highly available with replications across multiple AZs
Great for knowledge graphs (Wikipedia), fraud detection, recommendation engines, social
networking
Timestream Overview
Fully managed, fast, scalable, serverless time series database
Automatically scales up/down to adjust capacity
Store and analyse trillions of events per day
Built-in time series analytics functions (helps you identify patterns in your data in near real-
time)
QLDB Overview
QLDB stands for” Quantum Ledger Database”
A ledger is a book recording financial transactions
Fully Managed, Serverless, High available, Replication across 3 AZ
Used to review history of all the changes made to your application data over time
Immutable system: no entry can be removed or modified, cryptographically verifiable
2-3x better performance than common ledger blockchain frameworks, manipulate data using
SQL
Difference with Amazon Managed Blockchain: no decentralization component, in accordance
with financial regulation rules
Managed Blockchain Overview
Blockchain makes it possible to build applications where multiple parties can execute
transactions without the need for a trusted, central authority.
Amazon Managed Blockchain is a managed service to:
• Join public blockchain networks
• Or create your own scalable private network
Compatible with the frameworks Hyperledger Fabric & Ethereum
Glue Overview
Managed extract, transform, and load (ETL) service
Useful to prepare and transform data for analytics
Fully serverless service
If we have data in S3 Bucket and An Amazon RDS, we can extract data from them. Then we
create a script to transform the data. And load the data into Redshift.
DMS Overview
DMS – Database Migration Service.
This service will take data from a source DB using an EC2 instance running DMS, then the
data will be migrated into a target DB.
It allows to quickly and securely migrate databases to AWS, resilient, self healing
The source database remains available during the migration.
Fargate
This service will launch Docker containers on AWS.
But we do no need to provision the infra (so no EC2 instances needed to be managed), it is
much simpler.
This is a serverless offering, since we do not need to manage any server/instances.
AWS just runs the container for us based on the CPU and RAM we need.
Serverless Introduction
Serverless is a paradigm in which developers don’t have to manage server anymore, they just
deploy code or functions.
Initially serverless is a FAAS (Function as a service), and started by AWS Lambda but now
includes anything that is managed by AWS like: DB, Messaging, Storage.
Serverless doesn’t mean there is no servers. There are servers, but we do not manage them,
do no provision them and we don’t see them.
AWS Lambda
If we use an EC2 instance:
It is a virtual server on the cloud.
It is limited by RAM and CPU.
It is running continuously.
To scale we need to intervene and add or remove servers over time.
If we use a Lambda function:
It is a virtual function – so there are no servers to manage.
It is limited by time – meant to be run in short executions.
It runs on demand.
It scales automatically.
Benefits of Lambda:
We can also run Lambda Container Image, which the image must implement the Lambda
Runtime API.
AWS Batch
This is a fully managed batch processing at any scale service.
It runs efficiently 100K of computing batch jobs on AWS.
A “batch” job is a job that has a start and an end (opposed to continuous which continues
infinitely).
The batch jobs are defined as Docker Images and run on ECS.
It is helpful for cost optimizations and to us to focus less on the infra, since it provisions the
instances on its own.
Lambda VS Batch:
Lambda has time limit, it is limited it runtimes, it is limited in disk space, and it is serverless.
Batch has no time limit, can have any runtime if it’s packaged as a Docker Image. It relies on
EBS or Instance Store for the disk space. And relies on EC2 (which is managed by AWS.)
LightSail Overview
This is a stand-alone service which gives virtual servers, storage, DB, and networking.
It has low and predictable pricing, and it is simpler alternative to using EC2, RDS, ELB,
EBS, Route 53 and so on.
It is great for people with little cloud experience, and we can also setup notifications and
monitoring on the Lightsail resources.
We can create simple web apps, websites, dev/test environment and so on.
It has high availability, but it has no auto-scaling and it is limited with AWS integrations.
Deploying and Managing Infra at Scale
CloudFormation Overview
(Create infra from code)
CloudFormation is a declarative way of outlining AWS infra for any resource.
For example, in a CloudFormation template I can say that I want:
security group, 2 EC2 instances that use the security group, S3 bucket, ELB in front.
CloudFormation will create these, in the right order with the same configs that we specify.
As a developer we do not want to manage the infra manually, we want to deploy code. And in
the code, we can configure everything, instead manually. Also, scale is a concern, and since it
is hard to configure 100 EC2 instances, this can be done through code.
As most web apps have the same architecture (ALB + ASG), we want to our code to produce
all those things and possibly to run different apps and environments.
Elastic Beanstalk is a developer centric view of deploying an app on AWS. It uses the same
components as before, and we have full control over the configs.
The is a Platform as a service (PaaS).
This is a free service, but we need to pay for the infra.
AWS CodeCommit
Before pushing the app code to servers, it needs to be stored.
We usually store code in a repo, using git.
This is same as GitHub.
CodeCommit allows source-control that hosts Git-based repos. It makes easy to collaborate
with others on code and changed are automatically versioned.
This is a fully managed repo, scalable and highly available, private, secure, and integrated
with AWS.
AWS CodeBuild
This is a fully managed serverless service. It is continuously scalable and highly available,
secure, and pay as you go.
It allows code building service in the cloud.
It compiles the source code, ruin tests, produces packages that are ready to be deployed.
The code can be taken from CodeCommit, and then CodeBuild will build the code and then
we have a ready-to-deploy artifact.
AWS CodePipeline
This service allows to orchestrate the different steps to have code automatically pushed to
prod.
Code -> build -> test -> provision -> deploy.
This is the basis for CICD.
It is a fully managed, compatible with many services.
Allows fast delivery and rapid updates.
CodeCommit -> CodeBuild -> CodeDeploy -> Elastic Beanstalk.
This is can orchestration layer.
AWS CodeArtifact
Software packages depend on each other to be built (code dependency), and new ones are
created.
Artifact management – storing and retrieving dependencies.
Instead of setting up our own artifact management system we can use CodeArtifcat.
This is a secure, scalable, cost-effective artifact management for software development.
It works with common dependency management tools.
Developers and CodeBuild can retrieve dependencies from CodeArtficat.
AWS Cloud9
This is cloud IDE (Integrated Development Environment) for writing, running and debugging
code.
This once can used in the web browser; we can work on this IDE from anywhere with
internet and no setup is necessary.
It allows code collaboration in real-time.
This means that we don’t need SSH access, or bastion hosts, or SSH keys. Also, port 22 is no
needed (so we get better security).
Note – the instance has to have an IAM role for SSM access.