Implementation UCD AU19B1014
Implementation UCD AU19B1014
CS7201
Integrate analysis, design, architecture, optimization,
experiments and simulation to build application
subject to given constraints for user centered design
project.
Sourabh Sharma
01
Few Considerations for designing VPC:
1. Always a good practice not to use existing IP ranges of local area networks of our
organization.
4. Beforehand assume the no’s of regions where the organization will operate & also the
no’s of accounts in our organization.
5. In AWS VPC we have a minimum /28 (16 IP), a maximum /16 (65456 IPs) nos of CIDR
( I Avoid common ranges - avoid future issues. From 10.0 to 10.15 as its human
tendency to pick a range between these limits ).
1. In AWS Services don't get launched and run directly into VPC, we will launch them in
subnets.
02
Snipped from IP-Structure Excel Sheet
I have submitted this IP-STructure in Zip, under IP Planning folder
Visually this is how our CIDR will look (Utilizing above IP-Plan)
03
Adding Multi-Factor Authentication to all our accounts will add an extra layer of security to
the accounts. For MFA I used AUTHY tool which is a multi-platform tool
04
Service Used
AWS Organization
Step3) We can see the bills for different accounts are consolidated
05
This is how our Final AWS-Organization Looks and How I have added different
features to achieve my objective-1
Trust Policy
Role Switching
Permissions Policy
Role Switching 06
Service Used Language Used Editor Used
This is the visuals of elastic architecture I implemented over AWS using VPC, ELB,
ASG EFS and RDS
NOTE: The following Infrastructure as codes are submitted in zip file under Elastic Architecture
folder
Step2) Enabling Static-webiste hosting on S3 bucket and attaching public policy to it.
09
CLOUDFRONT
Step1) Using principle of least priviledge, I will assign proper permission policy to the
Developer who will be utilizing s3 and CloudFront.
When we access the website using s3 URL, we can see that our static
website is not secure that is: its not using HTTPS protocol
10
Now there exist 2 major problems with our website
1.As its created in N.Virginia region, we will only have good performance for
N.Virginia region but there will be global performance issues.
2.Our website is running on HTTP (i.e., it’s not secured, data is not
encrypted in transit) and even if we put https in URL, the page wont load as
S3 is not capable of delivering the static website functionality using https.
Step2) So, to solve 1st problem, I’ll make use of CloudFront and Start by
making a Cloudfront distribution
11
Step3) We need to increase CF limit for that, I logged a ticket to increase my
CloudFront service limit
Step4) Once the limit is increased by AWS, I created the CloudFront distribution and
again accessed the website. I can see both the website now is secured using HTTPS
12
MAKING A DYNAMIC WEBSITE
We can see below that the Dynamic website could be accessed using Ec2/machines IP address but
the images, video and audio is getting featched on the webiste using S3 pre-signed URL
13
CLOUDWATCH
Now below is the resource i.e., Ec2 running to Monitor its Hardware resources we have a pre-built
service i.e., CloudWatch which provides us with different Metrics such as CPUUtilization, disk read/write,
Network in/out etc. But it doesnt give any metrics on application or metrics on MemoryUtilization
Now, to log the custom metrics, I installed CloudWatch Agent on Ec2-instance so that
we can log application logs as well as generate custom metrics
1st I created VPC and 4 subnets (web, app, db., reserved) in each AZ (we
have 4 AZ) but we created subnet in 3 AZ’s, along with route table, IGW
and security group, 1 Ec2 instance (in web-a) subnet with Apache,
WordPress site & MariaDB already installed on it. (Monolithic style) using
my CloudFormation template
14
Step1) We download the cloud watch agent on our ec2.
wget https://s3.amazonaws.com/amazoncloudwatch
agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
# IAM ROLE
# EC2 Role
# Name: CloudWatchRole
#These are two AWS managed policy we’ll attach to this role.
1. CloudWatchAgentServerPolicy
2. AmazonSSMFullAccess
16
• Installing NEXUS on Cloud Server on Digital Ocean
17
• Configuring Cloud Server
18
• Starting the Nexus Software
19
• Checking on what port Nexus got started
20
• Creating Users over Nexus
21
• Creating a S3 Bucket
22
• Encryption of S3 Data
SSE-S3 is where the keys are provided and managed by S3 so we don't have
any admin overhead as well as no control over the keys
What S3 does is that it generates individual key for each individual object
and encrypt the data with that individual plaintext key. After encrypting the
data, it encrypts that individual plaintext key with its master key and discard
the plaintext key.
Then it is stores the ciphertext key along with encrypted data on the S3
storage.
If S3 wants to decrypt the data it first decrypts the ciphertext key with its
master key to get to obtain the plain text key and with the help of plain text
key it further decrypts the ciphertext-data to plaintext data. Finally, it
discards the key again.
24