CLOUD AND AWS
CLOUD AND AWS
What is a Cloud?
In simple terms cloud computing is a global network of servers connected with the internet
that combine together to form a huge hard drive. Let's take a look at some examples like
when you are watching a youtube video , accessing PrepinstaPrime courses or maybe
listening to music on spotify you are using cloud. There are various platforms where you
can work with cloud like Google have GCP (Google cloud platform ) , Amazon have their
own product AWS (Amazon web services) ,Azure by microsoft. There are various types
of cloud deployment model like
Public cloud
Private cloud
Hybrid cloud
Community cloud
AWS is a public cloud which works on pay-as-you-go billing models. Public clouds are
managed by third parties which provide cloud services over the internet to the public, these
services are available as pay-as-you-go billing models.
Public cloud resources approach and apply the PAYG model differently. For example, a
user provisioning a dedicated cloud server is generally billed according to server power and
usage and on a recurring basis. Software as a Service (SaaS) works similarly, where a user
leases software and customized features. Storage as a Service (SaaS) billing rotates on a
frequent basis because storage requirements increase are usually subject to gradually
increased pricing.
Advantages
Data backup (There is always a data backup available as its on cloud and one can
access it from anywhere if you have the right credentials )
Accessibility and collaboration (This made the work from home easy as multiple
people can come together and collaborate and work)
No maintenance cost (You don't have to maintain the servers its taken care by the
Amazon)
Mobility ( If you have internet connection you can work from anywhere its mobile)
Pay as you go (You only need to pay for what you are using )
Unlimited storage (lets say your storage is full if you are using hard disk on need to
buy extra disk for new data but in cloud you can get extra space within fer seconds )
Data security (There is a multiple security level that is applied by AWS )
Disadvantages
Internet connectivity (If you don't have a good internet connection so you won't be
able to use the )
Vendor lock in (Let's suppose if a company is using AWS as a cloud service at initial
stage and after 3-4 years the company want to change the vendor to GCP let’s say just
because of some features so all the data and everything that is there in AWS need to be
shifted to GCP and that can cause a lot of complications )
Limited control (You only have a limited control of the services)
Sense of security
Public cloud
Typically have massive amounts of available space, which translates into easy scalability.
Recommended for software development and collaborative projects.
Public cloud is open to all that is open to all to store and access information via the
Internet.
Offer networking services compute virtualization & storage over the public network
Very cost effective
Not very secure
No setup or maintenance required
Private
Community
Similar to public cloud but offers its services to a specific set of users who share a
common objective/interest.
Managed and hosted internally or by a third-party vendor.
Cheaper and more efficient than the public cloud.
Not so popular hence is not available across all industries.
Hybrid
There are various cloud computing services some of the services are as follows
SAAS(software as a service)
IAAS(infrastructure as a service)
PAAS(platform as a service)
SAAS
Software as a service (or SaaS) is a way of delivering applications over the Internet as a
service. Instead of installing and maintaining software, you simply access it via the
Internet, freeing yourself from complex software and hardware management. Examples of
SaaS: Microsoft Office 365, Salesforce, Cisco WebEx, Google Apps.
IAAS
Infrastructure as a service (IaaS) is a form of cloud computing that provides virtualized
computing resources over the internet. Examples of IaaS: Microsoft Azure, Amazon Web
Services (AWS), Cisco Metacloud, Google Compute Engine (GCE).
PAAS
There are various cloud providers here we will be discussing about few of them
AWS:- Being the Early in the market it has the Largest Computing Capacity and
Flexible pricing it also have various services
Azure:- Azure is the Second best in the market.It Works great if you are familiar
with the Microsoft ecosystem.
Google Cloud:- GCP is the Most Economical & has Exclusive features based on
search engine analytics.
In the year of 2000 it was a startup and they were in debt and they relaunched their product
in 2006 again as the competition came and AWS became better and better .
The AWS operates from over 25 regions globally which are spread over 6 continents and
over 200 edge location as CDN (content delivery network)
Another major advantage is recovery and backup. You can backup your data in multiple
regions EBS (Elastic bus storage) There is always a backup of a backup.
Better security there is multiple layers of operational security and it also does multiple
security checks.
Scalability: You can scale up or scale down based on the requirement.And its very flexible
it allows you to select what operating system you want to work on, Programming language,
web application platform and more.
Location(availability)
Recovery and backup
Better security
Scalability
Flexibility
Pricing
Lambda : AWS Lambda is a serverless, event-driven compute service that lets you run
code for virtually any type of application or backend service without provisioning or
managing servers.
Elastic beanstalk : Amazon Elastic Block Store (Amazon EBS) is an easy-to-use, scalable,
high-performance block-storage service designed for Amazon Elastic Compute Cloud
(Amazon EC2).
Elastic Load Balancer : Elastic Load Balancing (ELB) is a load-balancing service used for
Amazon Web Services (AWS) deployments.
Developer tools: it helps developer to deliver a software quickly and safely also
maintaining source code and versions
Networking
VPC:- Amazon Virtual Private Cloud (Amazon VPC) provides you with full control
over your virtual networking environment, including resource placement,
connectivity, and security.
Snowball: its a data transportation solution that uses secure appliances to transfer
large amount of data in and out of the AWS cloud
Cloudfront :- it helps to increase the availability and downloading speed of the data
or the content.
Direct connect: AWS Direct Connect is a cloud service that links your network
directly to AWS to deliver consistent, low-latency performance.
Route53 : Amazon Route 53 is a highly available and scalable cloud Domain Name
System (DNS) web service. It is designed to give developers and businesses an
extremely
Object storage
Block storage
File storage
Within storage services there are services like (s3 buckets),glaciers (archive
data),EFS(Elastic File system) is a scalable storage solution that can be used for general
purpose solution EBS(Elastic Block storage) its used with EC2 instance for persistent data
storage & have high availability and low latency storage gateway is another which provide
you on primes access to unlimited cloud storage .
Security:
It's a very important part of data security so here we will have a look at some
services that help to make the data secure.
IAM (Identity access management ) : from this Admin can manage the user access
and encryption keys
KMS(key management Service) : it uses hardware security modules FIPS 142 (its a
government recognised body)
BlockChain: it helps many parties to manage multiple transaction records Amazon
Managed Blockchain manages and creates blockchain networks. There is Something called
QLDB that creates a complete and accurate record of all financial transactions, such as
credit and debit transactions.
Macie: Amazon Macie is a fully managed data security and data privacy service that uses
machine learning and pattern matching to discover and protect your sensitive data in AWS.
Instance
What is an instance?
An Amazon EC2 instance is a virtual server that runs applications on Amazon's Elastic
Compute Cloud (EC2) infrastructure. AWS is a comprehensive and ever-evolving cloud
computing platform, and EC2 is a service that allows business subscribers to run application
programmes in a computing environment. It can be used to create virtually infinite virtual
machines (VMs).
To meet user needs, Amazon offers a variety of instances with different CPU, memory,
storage, and networking resource configurations. Each type is available in a variety of sizes
to meet the needs of different workloads.
EC2
Launching an Instance
Step 1:- Go to sign in to the console and sign as a root user
Step 2:- Type your password and captcha
Step 3:- Select EC2 as a service in the search bar
Step 4:- Select the AMI (Amazon machine instance )that you want to launch, let's
say we select wordpress.
Step 5:- click on next and choose an instance type as t2.micro
Step 6:- next select the configuration instance details where you can select number of
instances and subnet and lot more
Step 7 :- Select the storage you need to select the limited storage lets say we add 15
GB
Step 8 :- select configure security group
Here you can add the security rules, you can make a new security rule or you can use
the security group that was defined previously.
Step 9:- Now Select key pairs for the first time we will create a new security group
What is AMI?
An Amazon Machine Image (AMI) provides the information required to launch an
instance. When launching a new instance, you must specify an AMI. When you need
several instances with the same configuration, you can launch them all from a single AMI.
When you need instances with different configurations, you can use various AMIs to
launch them. The following are components of an AMI:
One or more Amazon Elastic Block Store (Amazon EBS) snapshots, or a template
for the instance's root volume in case of instance-store-backed AMIs (for example,
an operating system, an application server, and applications).
Permissions for launching instances using the AMI that control which AWS accounts
can do so.
When the instance is launched, this block device mapping specifies the volumes to
attach to it.
S3 Revising storage
Why do we need storage? To store the data and to keep it secure.
1. EBS:- Elastic bus storage is very scalable and fast retrieval if you have access to the
instance to which it is attached.
2. EFS:- its much more collaborative and the data retrieval and all is scalable
3. Glaciers :- Its in archival form of data the retrieval is not that fast
4. Storage gateway:- AWS Storage Gateway is a set of hybrid cloud storage services
that provide on-premises access to virtually unlimited cloud storage.
Ease of use
Reliability
Integration
Scalability
Migration
S3 storage classes
Key Features:
Key Features:
Frequent, Infrequent, and Archive Instant Access tiers have the same low-latency and
high-throughput performance of S3 Standard
The Infrequent Access tier saves up to 40% on storage costs
Deep Archive Access tier has the same performance as Glacier Deep Archive and
saves up to 95% for rarely accessed objects
Designed for durability of 99.999999999% of objects across multiple Availability
Zones and for 99.9% availability over a given year
Key Features:
Key Features:
Key Features:
Key Features:
What is versioning?
Versioning is the means of keeping the multiple forms of an object in the same s3 bucket.
Versioning can be used to retrieve, preserve and restore every version of an object in s3
bucket.
If you overwrite the object it creates a new version of the object and also restores the
previous version of the object.
Now let's see how this versioning works. Create a new s3 bucket this time enable the
versioning section. Now upload the file and upload the same file again you will be able to
see the different versions of the same file that you have uploaded.
To understand the life cycle you must take care that the versioning is enabled for the
bucket.
Lets understand this using example we will be creating 2 buckets and the versioning must
be enabled in order to do this practical.
Make two s3 buckets, let's say destination and one bucket as source bucket, select a
different region for destination bucket and versioning must be enabled in both the
buckets.
Go to source bucket and then on management and create replication rule.Give this
rule a name let’s say transfer
Next select the source bucket and give it a prefix let's say source to destination.
Now you need to select the destination bucket in that select bucket in this account
and specify the destination bucket
In Additional Replica options check mark replica modification Sync that will update
the destination if there is modification in source bucket .
And then click on save and the replication rule is created.
Bucket policies
There are ways from which we can give access to some user, that is which person has
access to which part of the data.
To check if the above policy is implemented or not we will first empty the bucket and then
try to delete the bucket you won't be able to delete the bucket.
[Note:- Sometimes event after removing everything from the bucket their is some metadata
left so you can click on empty to clear the bucket]
S3 Data Acceleration
It helps in quick , easy and safe transfer of file distance between client and s3 bucket is
usually large so cloudfront helps to accelerate the data transfer and they charge extra
charges for that as it's accelerated service.
IAM Part 1
At the time of login to AWS management console you will be able to see two kinds of
login one is root login and the other is IAM user. Root is the admin and admin can create
multiple IAM users IAM stands for (Identity access management). Let’s say if you are a
root user and there is another member in your team who wants to access the EC-2 instance
then what you as a root user can do is create a new IAM user that is username and
password with the access to the EC-2 instance and give that credentials to the other
member. There are various features that we will be discussing in this course:-
Shared access
Granular Permission
MFA (Multi factor authentication )
Identity Federation
Free to use
PCI DSS (Payment Card Industry Data Security Standard)
Password Policies
IAM Part 2
Once you create an IAM User there are different ways let's discuss them here.
User :- if you want to set permissions for a single user to access the ec2 instance then what
you as a root user can do is generate email and password for that user and give the
permission directly.
User Group :- Let's say there are 200 members in a team working on a project and you
want only 50 of them to access a particular ec2 instance then what you can do is make a
group and then give them the access to whatever the use case is.
Policies:- In this you can customize let's say if you want a user to access the instance only
and only if the user is there in ohio region then only the user will be able to access the
instance
Working on IAM
1. It is a global service so first we will be creating an IAM user then we will be giving
access to some of the services like s3 bucket.
2. Go to IAM and click on user > create user
3. Give it a username and
4. Select the AWS access type as Password AWS Management console for console
password select custom password.
5. Select the required password that will allow the user to set a custom password at the
time of first login.
6. Click on create next and then you will be able to see the review and then click on
create user.
7. You will get a 12 digit key copy and at the time of login select the IAM user and in
the Account id paste the 12 digit id that you have copied.
8. Then It will ask for Password ,Username and for the first time it will ask to change
the password > Login to IAM user
1. > At this time you don't have access to any of the services
9. To Give IAM user permission to services go to the root user and then click on user >
permission
10.and select the permission that you want to assign to that user lets say full access to s3
bucket.
1. > In IAM user now you will be able to see the s3 bucket that we have created
Working on IAM Part 2
To remove the permission what you can do is to remove all the permission one by one and
another is AWSDeny all will nullify all the permission that you have given to the user
previously.
You can also create groups and give a group permission. For example you have created a
group S3access and this group have permissions to s3 buckets so you can do it by clicking
on the s3access and go to permission then give the access to s3 permission.
If you are an IAM user then you won't be able to go to the IAM. That is you as an IAM
user can't create further IAM users.
Lets create a new user group and give it a name.Now let’s create a custom policy and then
go to json . in a new tab search for AWS policy generator
Activation MFA
AWS Multi-Factor Authentication (MFA) is a simple best practice that adds an extra layer
of protection on top of your user name and password. With MFA enabled, when a user
signs in to an AWS Management Console, they will be prompted for their username and
password (the first factor—what they know), as well as for an authentication code from
their AWS MFA device (the second factor—what they have).
To enable MFA go to IAM and on the top right corner of the dashboard click on the Add
MFA
It will ask you choose MFA device in that select virtual MFA device
Click on continue and then you will be able to see a QR code
For this you need to download google authenticator download it and scan the qr
Next you will ge two MFA code enter the code
After activating the MFA code if you sign out and login again to the aws management
console as a root user then you will be asked for a MFA code that you will be getting in
google authenticator app .
Roles
An IAM role is a specific permissioned IAM identity that you can create in your account. An
IAM role, like an IAM user, is an AWS identity with permission policies that govern what
the identity can and cannot do in AWS. A role, on the other hand, is intended to be available
for anyone who needs it, rather than being uniquely associated with one person. A role also
does not have any standard long-term credentials associated with it, such as a password or
access keys. Instead, when you assume a role, you are given temporary security credentials
for the duration of your role session .
[Note:- you can also set budget on the monthly basis like in the month of june we can set
different budget and for different month we can set other amount ]
As of now there is no alert you can set threshold alert you can add recipients emails and
then click on next review this budget and then click on create budget.
VPC Part-1
It allows developers to create a virtual network of resources in an isolated section of AWS
cloud.(VPC is not a global service ). Amazon Virtual Private Cloud (Amazon VPC) allows
you to launch AWS resources into a predefined virtual network. This virtual network
closely resembles a traditional network that you would run in your own data centre, but
with the added benefit of using the AWS's scalable infrastructure.
AWS also sets a limit to the size of vpc. A user can’t change the size of vpc once the vpc is
created. VPC also has a limit of 200 subnets per vpc each of which support 14 ip addresses.
If you have created a VPC in a particular region and if you change the region then you
won’t be able to access that VPC.
Let's discuss about what is IP address and CIDR (classless Inter-Domain Routing)
What is an IP address?
It's a string of numbers separated by “.”, An IP address is a unique address that identifies a
device on the internet or a local network. IP stands for "Internet Protocol," which is the set
of rules governing the format of data sent via the internet or local network.Its allocated by
organization IANA (Internet Assigned Numbers Authority ).The IP address is assigned to
you by your ISP (internet service provider)
It's also known as supernetting, a method of assigning an ip address that improves the
efficiency of address distribution and replaces the previous system that was based on class
A,B,C network.The initial goal was to slow down the routing tables across the internet.
CIDR blocks are groups of addresses that share the same prefix and contain the same
number of bits.
What is CIDR notation?
VPC Part-2
It's more secure, it gives an isolated environment, it also allows you to set up subnets of
different ip ranges and network configuration as per your preferences.
VPC is the best way to connect your data center to your instances on your aws.In other way
its best way in order to create a private channel between your own channel and the Data
center.
Security Groups is a software firewall used to manage the inbound and outbound traffic
rules.
Default VPC
✓ Already there for the user as soon as the first instance is provisioned.
✓ Has a private as well as a public IPv4 address.
✓ Has access to the internet by default.
✓ Already has an Internet Gateway & is ready to use.
✓ One VPC per region.
Custom VPC
Route table — A set of rules, called routes, that are used to determine where
network traffic is directed.
Subnet — A range of IP addresses in your VPC.
Security groups — Security Groups is a software firewall used to manage the
inbound and outbound traffic rules.
NAT gateway: A managed AWS service that allows EC2 instances in private
subnets to connect to the internet, other VPCs, or on-premises networks.
NACL(Network ACLs) An optional layer of security for your VPC that acts as a
firewall for controlling traffic in and out of your subnets.
VPC Peering :- allows you to router traffic between two VPC using ipv4 and ipv6 ip
addresses It allows you to facilitate the data transfer.
Elastic IP address:- Its used to make permanent IP address
Network Interface :- Its a connection between
Customer gateway :- A customer gateway is a resource that you create in AWS that
represents the customer gateway device in your on-premises network.
VPC Endpoint :- A VPC endpoint is a horizontally scaled, redundant, and highly
available virtual device that allows communication between EC2 instances in your
Virtual Private Cloud and other supported AWS services without introducing
availability risks or bandwidth constraints on your network traffic.
Open your console, click on VPC and select the region in which you want to create
the VPC.
Give vpc a name, let's say myVPC in this case.
To create VPC click on create vpc give it a name and ipv4 CIDR range as
10.0.0.0/16,in tenancy leave it default
Then click on create VPC.
Next we will be creating two subnets public subnet and private subnet go to subnet section
and click on create subnet
This will ask for selecting the vpc id select the VPC the you have created previously
Give this subnet name let's say private subnet
In the subnet settings You can select the availability zone as US East Ohio and Ipv4
CIDR range as (10.0.0.1/24)
Then click on create subnet
Next we will create a new subnet that will be a public subnet and select the same vpc
that you have selected for making the previous subnet.
Give this subnet name is public subnet & select Ipv4 CIDR range as (10.0.0.1/24)
and then click on create subnet.
Next go to route table it contains set of routes here we will create 2 new route table one for
public subnet and other for private subnet
Give this route a name (Public subnet route) ,Select the vpc that you have created
before
Next create another route (Private subnet route), Select same vpc
As this is not yet connected to any subnet now so lets connect this with subnet click
on the Public subnet route and below you will be able to see subnet Association go to
that
You can edit the subnet association and select the public subnet from the options.
Do the same step for the Private subnet route
Now the Public subnet route is connected to the private subnet and the Public subnet route
is connected with the public subnet.
To create Internet gateway click on create gateway and give it a name prepvpc, But
as of now it's not linked with any subnet or VPC.
Click on the internet gateway that you have created and on the top right corner you
will be able to see the attach VPC option.
Click on attach VPC select public one.
Now how do you control these subnets going to communicate with the internet, And this is
done by route
Select the public route and you will be able to see the route section click on edit route (This
is the destination of VPC).
Select route that is 0.0.0.0/0 and in target select internet gateway (That you have just
created)
And this is how the subnet is connected to the internet gateway through the routes .
KMS Theory
There is a key on the server side that is used to encrypt the data and there is a decryption
key that is used by the client side to decrypt the data.
Amazon KMS provides a single view of all the aws keys that are in use creating centralized
encryption keys.
The encrypted data is sent to the CMK and is decrypted using CMK. AWS also uses
concepts like hardware security like even if someone tries to access the data then it will
delete the data.
To encrypt the data CMK generates a data key and also generates an encrypted data key,
And you have to encrypt a large number of files.
So suppose you have a data file and the data key that is generated by cmk, Using the data
key it will send it to the encryption algorithm after that it will generate a cipher text then
this will create an encrypted message.
And if you want to decrypt the message then you can use the encrypted data key generated
by CMK.
Here we will be discussing how to create ec-2 instance into vpc that you have created
Click on ec-2 instance select any ami let's say Amazon Linux 2 AMI click on next
And in the settings select the VPC that you have created before and in the subnet select that
subnet that was created previously select the public subnet,for auto assign Public IP enable
it.
For add storage and add tags leave it by default and in the step 6 add security group add 2
more rules HTTP and HTTPS for the port range as 80 and 443 respectively. Next click on
review and launch.
Create one more instance using the same steps but for this time select a different subnet
that is a private one and for auto assign Public IP disable it.
And this is how you can launch an instance in a public and private subnet respectively.
Subnet
What is subnet?
Subnet is a segmented piece of a large network, It's a logical partition of a ip network into
multiple smaller ip ranges.
Routers are used to connect between subnets, The size of the subnet depends on the
connectivity requirements.
The IP address have 2 parts that is network prefix and other is host id
Subnet mask is used to identify the part of the address that should be used as a subnet id
subnet mask is applied to the full network address.
The network prefix and the host id division will depend on the ip address means in which
class the ip belongs to.
Uses of subsets
Reallocating IP address.
Relieving network congestion
Improving network security
Public subnet
Private subnet
The traffic in private subnet is routed through NAT in the public subnet you can also
restrict the route to 0.0.0.0/0 to make it as a private subnet with no internet access.
Route Tables
Route table contains a set of rules that contains routes.The routes table controls the routing
of the subnets and subnets can be associated with only one route table but you can connect
multiple subnets to the route table.
The internet gateway is always attached to the public subnets. Each of the subnets is
connected to the route table as a set of rules that the vpa needs to follow in order to
communicate with the outside world (Internet).
Internet gateway is a horizontal scaled redundant and a highly available VPC component that
allow communication between the VPC and the internet
IPv4 It was brought in action for production within APRNET. It was an early version of the
internet that was the 1980's. Its 32 bit which can be expressed in decimal notation
IPV6 is a network layer protocol that allows communication to take place over the internet.
It was designed by IETF internet engineering task force
N AT gateways Part 1
Network address translation (NAT)
We use NAT so that the instances are in the private subnet that is outside of the VPC .
When we create a NAT gateway it ask us to specify the connectivity that we want there is 2
categories that is public and private one
When you set up a NAT gateway, you choose one of the following connectivity types:
Public – (Default) Private subnet instances can connect to the internet via a public NAT
gateway, but they cannot receive unsolicited inbound connections from the internet. When
you create a public NAT gateway in a public subnet, you must assign it an elastic IP
address at the time of creation. You route traffic from the NAT gateway to the VPC's
internet gateway. You can also connect to other VPCs or your on-premises network using a
public NAT gateway. In this case, traffic is routed from the NAT gateway via a transit
gateway or a virtual private gateway.
Private NAT gateways allow instances in private subnets to connect to other VPCs or your
on-premises network. Traffic from the NAT gateway can be routed through a transit
gateway or a virtual private gateway. An elastic IP address cannot be linked to a private
NAT gateway. You can connect an internet gateway to a VPC via a private NAT gateway,
but routing traffic from the private NAT gateway to the internet gateway causes the internet
gateway to drop the traffic.
NAT gateways Part 2
To create NAT gateway click on NAT gateway
Give this NAT gateway name “MyNAT”, select the subnet as the public subnet that
you have created previously.
Next we will allocate an Elastic IP address so that it can communicate with the
internet .
Now click on create NAT gateway
In the route table private subroute it already has a route add one more route that will point
to the NAT gateway that we have created and select the destination as 0.0.0.0/0.
The NAT gateway is linked to the subnets and the route tables which are also linked to the
subnets.
Each instance in a subnet in your VPC can be assigned to a different set of security
groups.
An instance in a security group can't communicate with any other security group until and
unless you have added a rule for that particular part.
Network ACL -: An access control list (ACL) contains rules that grant or deny access to
certain digital environments.
Security Group
Network ACL
A VPC peering connection is a networking connection that allows you to route traffic
between two VPCs using private IPv4 or IPv6 addresses. Instances in either VPC can
communicate as if they were in the same network. You can establish a VPC peering
connection between your own VPCs or with another AWS account's VPC. VPCs can be
located in various regions (also known as an inter-region VPC peering connection).
A VPC peering connection allows you to speed up data transfer. If you have more than one
AWS account, for example, you can peer the VPCs across those accounts to create a file
sharing network. A VPC peering connection can also be used to allow other VPCs to access
resources in one of your VPCs.
You can establish peering relationships between VPCs across different AWS Regions (also
called inter-Region VPC peering).
Direct Connect
AWS direct connect links your internal network to an AWS direct connect location over a
standard ethernet fiber optic cable. One end will be connected to your router and another
one to the aws direct connect.
Connections
Virtual interfaces
There are two types of virtual interfaces Public virtual interfaces which enable access to
public services like s3 Private virtual interfaces enables access to VPC
You can set up routing rules to determine where to send data to build application
architecture that will react in realtime to the data sources.
Previously known as Cloud Watch Events
Features of eventbridge
With event bridge it reduces operational overhead there is no additional software server
required to provision, patch and manage servers
It has a built in distributed availability and fault tolerance.you can represent events as
strongly typed objects in your code.
Eventbridge Part 1
In the AWS console search for cloudwatch it's the same as eventbridge. And we want to get
notifications as soon as any instance is launched or start any paused instance, so let's create
a new rule as of now you won't be able to see any rules so let's create a new rule.
Eventbridge Part 2
Go to the rule that you have created and edit it in the select target where we have selected
the type of notification.
Here go to configure input you need to mention the input path and input template
Type this in the input path
{
“State” : “$.details.state”,
“Instance” : “$.detail.instance-id”
“The ec2 instance has been altered, Having the instance id <instance> has been modified to
<state> state.”
Now try to start the instance again and you will again get an email.