Skip to main content

Amazon Cloud


Cloud Services Models

IaaS
You hired on leased car. CSP provides cloud computing scalable infrastructure while the customer manages software.
PaaS
You hired a taxi. It allows environment for developing and deploying applications while the CSP manages all other components.
SaaS
You hired a Bus. It sis ready to use solution and CSP maintains an application and delivers it to the customers over the internet.


Limits

There are a number of default limits to be aware of when creating security groups. These can be defined as follows:




VPC security groups per region within your VPC = 2500

Rules per security group = 120 (no more than 60 inbound and 60 outbound)

Security groups per network interface = 5

5 VPC in a region and 200 Subnets and 200 Route table in 1 VPC can be created.

VPC is created on top of the availability Zones. If there are three availability zone in Mumbai then 1VPC subnet can be used across availability zone.

One subnet cannot be created in two availability Zone.


EBS//EFS

The main differences between EBS and EFS is that EBS is only accessible from a single EC2 instance in your particular AWS region, while EFS allows you to mount the file system across multiple regions and instances. Finally, Amazon S3 is an object store good at storing vast numbers of backups or user files.

S3 is storage for the internet.


S3 is Object based Storage

No operating system can be installed.

S3 has distributed architecture and stored in in three different location in same region.

Data is stored in bucket (folder). 

Bucket is flat container of object. You cannot create nested bucket means no bucket can be created inside the bucket. But you create folders in bucket.

Max capacity of bucket is 5 TB

Bucket ownership is non-transferable.

S3 is bucket is region specific.

You can have 100 buckets in an account.

S3 buckets names keys are globally unique.

Buckets names cannot be changed later.

Buckets names must be 3 – 63 characters

Buckets names are part of URL used to access a bucket.

Each object is restored and restored by unique key.

 Three bucket sub resources

Lifecycle --  S3 standard – S3 IA - Glacier

Website- host static website

Versioning  -- can be enabled and suspended but cannot be disabled. It protect from accidentally deletion.

Versioning can be used for data retention and archive.

You can restore the versioning file after deleting the delete marker.

Access control list--  bucket policies to give an access

Bucket permission can be granted to other account.

You cannot keep the copy of bucket in different region.

S3  multipath uploading if more than 5MB . If required to upload the files fast.

You can copy of the objects uptp 5GB size  in a single automatic operation means you can replicate in 5gb in one go.

Storage classes of Amazon S3- always charge for retrieval the data. Support SSL for data in transit and encryption for data at rest.

Amazon S3 Standard  --- keep for frequent access data. Storage cost is high but accessing cost is cheaper.

Amazon S3 Glacier Deep Archive – if you are using once in  a year. Cheaper the glacier. Design to retain data for long period – 10 years.

Amazon Glacier  -- Availability 99.9%. iT is a secure durable low cost storage class for data archiving. Data retrieval options can be decided.

Amazon standard Infrequent Access --  Storage cost is much cheaper but retrieval cost is high. Object size less than 12KB cannot move in S3 IA

Amazon one Zone IA  --  It does not keep any copy of data in same region so data can be lost. It is 20% less costlier than S3 iA. Availability 99.5%

Amazon S3 Intelligent tiering – Amazon does automatically move the data between S3 standard and S3 IA on the basis of access of data.

CloudFront – Content Delivery network

Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment.

Cloudfront is a global services.

Amazon cloudfront is a webservices that speed up the distribution of static and synamic web content such as html, css, images file.

Cloudfront delivers your content through a worldwide network of data center  called Edge locations.

When a user request content that you are serving with cloudfront, the user is routed via DNS resolution to the Edge location that provides the lowest latency to that content is delivered with the best possible performance.

Cloudfront can be access in following ways: AWS Management console, AWS SDKs, Cloudfront API, AWS command line interface.


Origin server located in US
Edge location server will be presented in all countries and will act as cache.
Regional server cache is also located on regional sites. It keep the content for long than the edge location.  
Edge location transfer the content to regional cache server if not being used in edge location.
Reginal edge cache working as alternative of origin to reduce the burden of origin.

Cloud watch


CloudWatch Metric is time-stamped, you can continually monitor and review data points in relation to a particular application or overall set of applications and resources

CloudWatch is a monitoring service for AWS resources and applications.
CloudTrail is a web service that records API activity in your AWS account. They are both useful monitoring tools in AWS.

By default, CloudWatch offers free basic monitoring for your resources, such as EC2 instances, EBS volumes, and RDS DB instances. 
CloudTrail is also enabled by default when you create your AWS account.
CloudTrail Logs are then stored in an S3 bucket.
CloudWatch Logs log group that you specify.

VPC Diagram




Amazon EC2 Reserved Instances (RI) provide a significant discount (up to 72%) compared to On-Demand pricing and provide a capacity reservation when used in a specific Availability Zone

How Do Amazon Rds, Dynamodb, and Redshift Differ from Each Other?
Amazon RDS is a database management service for relational databases. It manages patching, upgrading, and data backups automatically. It’s a database management service for structured data only. On the other hand, DynamoDB is a NoSQL database service for dealing with unstructured data. Redshift is a data warehouse product used in data analysis.

What is Amazon S3 Bucket?
Amazon Simple Storage Service (S3) is a storage that can be maintained and accessed over the Internet. Amazon S3 provides a web service that can be used to store and retrieve an unlimited amount of data. It is global by default and bucket are region specified.
S3 in Amazon has two entities called buckets and objects. Objects are stored inside buckets.
By default, the maximum number of buckets that can be created per account is 100. For additional buckets, one can submit a request for a service limit increase.

Access S3 from EC2 instance by using IAM role
create Role with S3 full access
Launch instance with role
Access S4 bucket CLI comments
Sudo -u
aws s3 mb s3://foldername
aws s3 rb  s3://foldername
mb make bucket

What is a bastion host, and do I need one? 

You may ask yourself, do I need a bastion host in my environment? If you require remote connectivity with your private instances over the public internet, the answer is yes!

Bastion hosts are instances that sit within your public subnet and are typically accessed using SSH or RDP. Once remote connectivity has been established with the bastion host, it then acts as a ‘jump’ server, allowing you to use SSH or RDP to log in to other instances (within private subnets) deeper within your VPC.

When properly configured through the use of security groups and NACL the bastion essentially acts as a bridge to your private instances via the internet.

This diagram shows connectivity flowing from an end user to resources on a private subnet through a bastion host:




When designing the bastion host for your AWS infrastructure, you shouldn’t use it for any other purpose, as this could open unnecessary security holes.

Here are the basic steps for creating a bastion host for your AWS infrastructure:

1.     Launch an EC2 instance as you normally would for any other instance.

2.     Apply OS hardening as required.

3.     Set up the appropriate security groups (SG).

4.     Implement either SSH-agent forwarding (Linux connectivity) or Remote Desktop Gateway (Windows connectivity).

5.     Deploy an AWS bastion host in each of the Availability Zones you’re using.


Security groups are essential for maintaining tight security  First, create an SG that will be used to allow bastion connectivity for your existing private instances. This SG should only accept SSH or RDP inbound requests from your bastion hosts across your Availability Zones (AZ). Apply this group to all of your private instances that require connectivity.


Next, create a security group to be applied to your bastion host. Inbound and outbound traffic must be restricted at the protocol level as much as possible. The inbound rule base should accept SSH or RDP connections only from the specific IP addresses (usually those of your administrators). You definitely want to avoid allowing wide open access (0.0.0.0/0). Your outbound connection should again be restricted to SSH or RDP access to the private instances of your AWS infrastructure.


SH and RDP connections require private and public key access to authenticate. This does not pose a problem when you are trying to connect to your bastion host from your local machine, as you can easily store the private key locally. However, once you have connected to your bastion host, logging in to your private instances from the bastion would require having their private keys on the bastion. As you will probably already know (and if not, then take careful note now), storing private keys on remote instances is not a good security practice

AWS  5-Pillars Architecture Framework

Security 

Reliability

Performance efficiency

Cost optimization

Operational Excellence


Security

Data protection  - encrypt using ELB, EBS, S3 and RDS

Priviledge management  --   IAM , MFA

Infrastructure Protection   --  VPC, CCTV, ACL

Detective controls   --  Cloud Trail, AWS config, Amazon cloud watch

 

How to encrypting and protecting the data at rest?

How to encrypting and protecting the data in transit?

How to protect access to and use of the root account credentials?

How to define roles and responsibilities of system users to control human access to the management console and APIs?

How can limiting automated access (such as from applications, scripts ot third party tools or services to resources?

How to manage keys and credentials?

RFID controls, Security , Lockable cabinets, CCTV

What Infrastructure protection exists at a VPC level

How to enfocre network and host-level boundary protection?

How enforcing AWS service level protection?

How to protect the integrity of the operating systems on EC2 intances?

How are capturing and analyzing logs?

Reliability

Foundation  --  IAM VPC

Change management   -- AWS Clouud Trail

Failure management  --  AWS cloudformation

How to manage service limits for your account?
How to plan the network topology on AWS?
Do you have an escalation path to deal with technical issues?

How does your system adapt to changes in demand?
How are you monitoring AWS resources?
How are you executing change management?

How are you backing up your data?
How does your system withstand component failures?
How are you planning recovery?

Design Principle
Test Recovery Procedures
Automatically recover from failure
Scale horizontally to increase aggregate system availability
Stop guessing capacity

Costs Optimization

Matched supply and demand  -- Autoscaling
Cost-effective resources  - EC2 reserved instances, AWS trusted advisore 
Expecditure awareness  -- Cloudwatch alarms, SNS
Oprimizing over time  --  AWS Blog, AWS Trusted Advisor


How do you make sure capacity matches but dows not substantially exceed what you need?
How are you optimizing your usage of AWS services?

Have you selected the appropriate resource types to mee+E7:E14t your cost targets?
Have you selected the appropriate pricing model to meet your cost targets?
Are there managed services (higher-level service than Amazon EC2, Amazon EBS, and Amazxon S3) that you can use to improve your ROI?

What access controls and proicedures do you have in place to goivern AWS costs?
How are you monitoring usage and spending?
Ho do you decomission resources that you no longer need or stop resources that are temporarily no tneeded?
How do you consider data-transfer charges when designing your architecture?

Desighn principle
Transparently attributes expenditure
Use managed services to reduce cost of onwership
Trade capital expense for operating expense
Benefits from economics of scale
Stop spending money on data center operations


Operational Excellence

Preparation
Operation
Response


What best practice for cloud operations are you using?
How are you doing configuration management for your workload?

How are you evolving your workload while minimizing the impact of change?
How do you monitor your workload to ensure it is operating as expected?

To ensure both appropriate alerting and notification in response to unplanned operational events as well as automated responses.

How do you response to unplanned operational events?
How is escalation managed when responding to unplanned operational events?


 

Comments