SlideShare a Scribd company logo
AWS Primer on
Best Practices and Resource Tagging Convention
Kenichi Shibata
Why do we need naming convention?
• Tagging for Deployment
• Tagging based on application usage
• Tagging based on ownership
• Tagging for cost structure (can check cost breakdown based on tags)
• Have to enable cost breakdown on the aws billing (usecase: for individual clients)
• Tagging for Automation
• All resources will be tagged and then can filtered or queried via tags
• Tagging as context helpers
• Not all resources are tagged appropriately by AWS and it could be confusing for
understanding what a specific resource does
Naming Best Practices
• Before we begin we have understand some key points in order to better
maintain the infrastructure in the cloud
1. Build infrastructure to scale
• This means that the infrastructure you handle right now will need to passed over very quickly
to a new engineer for a minimal training with only documentation and the context.
• Contexts should be provided with each resources to be able to identify how the resource fit
in;
2. Automate all/most infrastructure tasks
• Use Automation tools like cloudformation, boto3 or terraform for provisioning
• If tasks is repeated at least thrice we should automate it.
• Orchestration should be done automatically using config/template management like packer,
ansible.
• Use Infrastructure-As-A-Code whenever you run a new cluster
• Tags should be automated
Deployment Best Practices
3. Centralized jobs
• All cron jobs should be observable and should be visible to all devOps team. A local cron job for a specific
server is discouraged.
• Centralized jobs can help manage the workload among the Ops team and create a sense of teamwork
when rotating tasks, It helps gain visibility ensures quick and efficient action when something
unexpected occurs
4. Pipelined Tasks
• Tasks like continuous integration and deployment should be pipelined in order to find out at which stage
the task failed,
• Infrastructure As A Code should be the norm when deploying new infrastructure. These tasks
deployment should be pipelined within the centralized observable pipeline
5. Containerized/AMI Deployments
• Blue Green Deployment should be done to each servers in order to test the code in a production like
setting
• Deployments to each new Instance should be done by using a snapshot of a proven instance running an
application that starts on bootup
• Running Clusters of Containers is Recommended however please keep in mind the overhead of running
containers
Security Best Practices
6. Use MFA for all Users and set harder restrictions on password
• Every engineer who has access to the AWS Console should have MFA enabled
• The passwords policy can be configured from the IAM Console, The passwords should at
least have one uppercase and one number.
7. Not Everyone should have access to the console
• Developers who will only need a specific access can use the Command Line Interface
with AWS AccessKey and SecretKey instead,
• Use the principle of least privilege and only give access to specific resource, For example
instead of giving write access to all s3 buckets, Only give list access and write access to a
specific s3 bucket
8. Turn on CloudTrail
• Get all the audit logs for each calls to the aws api using your account credentials
Resource Types
• Currently this document covers the following resource types
• EC2
• VPC
• VPC Subnet
• Sec Group
• S3
• Routing Table
EC2
• Name – naming convention – {env/owner(count)-cluster-app}
• e.g. mng01-infra-bastion, prd-web-abcd, acmecorp01-infra-yourapp1
• Environment – stg, dev, prd, mng
• Cluster/Platform – Infra Management, ecommerce, crm,projectcode1 , (optional)
• App – app1proxy, app1loadbalancer, app1api
• Tier – Database, Web, API, App, Datastore, (for multi tiered architectures)
• Subnet – {subnet-name} should be queried on terraform
• Owner – {customer1} if owned by third party (optional)
• Maintainer –email
• Architecture- /Diagrams/file.uml, http://wiki (optional)
• Count – 01, 02, 03 (for asg use e.g. prd01-web-app-asg) else use prd01-web-app
EC2
• Why is name prefixed on client instead of env when it is available?
• We assume that the clients will always have production environment afforded
to them if they will need to test or do acceptance test we can set it up on
staging or development environments to share costs, using data encryption
for the test data if need be.
• e.g. mng01-infra-bastion, prd-web-abcd, acmecorp01-infra-yourapp1
VPC
• Name – {platform}(count)-{tenancy}-vpc e.g. warehouse01-default-tokyo-vpc
• Tenancy – Default/Dedicated
• Count – 01, 02, 03 (You can also use names as instead of numbers)
• Region – Use the common region name not the aws official name for brevity
• Platform – Ecommerce, Warehouse management, CRM, projectcode1
• Most application platforms will be inside a single vpc so the name of the platform will suffice.
However if we will need to scale to multiple regions, We will need to tag the Region as well to
provide context where we would like to run this specific platform.
VPC Subnet
• Name – {environment}-{availability}-{platform}-{accessibility}(count)-subnet
• E.g. prd-pub-warehouse01-pmry-subnet, stg-pvt-ecommerce-sdry-subnet
• Accessibility – Private, Public, Secured
• Maintainer – email
• Platform – Ecommerce, Warehouse management, CRM, projectcode1
• Cluster - DB, Web, API, App
• Environment – prd, stg, dev, mng
• Availability (Zone)– Primary(a), Secondary(c), Tertiary(b),
• Some regions only has ‘a’ and ‘c’ zones
What is public/private/secured?
• Public subnets are subnets which are directly connected to the internet
using an internet gateway or a egress only internet gateway
• There is a use case for a public -> nat -> public mapping of subnets if you want to
whitelist all requests from a specific subnet
• Public Subnets are best used for Internet facing Web Servers
• They need a public ip address or elastic ip in order to connect
• Usually the HTTPs termination is done on server running on public subnets
• Private subnets are subnets which are connected to the internet using a
NAT Gateway (network address translation)
• The subnets are usually mapped using private -> nat -> public. However the
limitation to these subnets are that they cannot serve traffic from Public DNS
without port forwarding.
• They are best suited for cache servers, database servers, middleware api, and
secured transaction interfaces,
What is public/private/secured?
• Secured Gateways
• Secured Gateways are for directly connecting a specific IP Address to another
IP Address. Without connecting to the rest of the internet, It is usually done
by Network ACL.
• A good alternative for Secured Gateways is AWS Direct Connect or AWS VPN
Connection
NAT Gateways
• The best practice in running NAT Gateway is using the AWS NAT Gateway it
scales depending on traffic and is easier to setup than a manual EC2 NAT
Gateway
• however please be aware that since AWS NAT Gateway is a full managed service it is
bound to limitations as well, Port forwarding for example is not supported as is
sniffing logs from the gateway
• To be able to get advanced functionality creating NAT Gateway from EC2 is
needed however setting a single EC2 instance as a NAT Gateway is an anti-
pattern since if the traffic grows enough then the NAT EC2 Instance will
become a bottleneck
• It is recommended to have a failover or a load balanced NAT Gateway if
you are going to use EC2
S3
• Name – {company-name}-{environment}-{platform}-{application}
• (S3 name is global and should be unique globally, so we add the company name or abbrev)
• E.g. acme-prd-warehouse-stockinventory
• Platform – Ecommerce, Warehouse management, CRM, projectcode1
• Application – Logs, Webapp, Webpage
• Environment – prd, stg, dev, admin
• File Naming – Inside the bucket please use random string to generate hashes if there are lots of files.
AWS Stores files in different servers using file name hashes, it is faster to retrieve and store with more
servers
Security Group
• Name – {environment}-{accessibility}-{application/protocol}-{direction}-sg
• E.g. prd-pvt-icmp-dx-sg, dev-pub-http-in-sg
• Group Name – same as name (required by aws)
• Protocol – ICMP, TCP, UDP
• Accessibility – pub, pvt, sec
• Direction – Inbound, Outbound, Duplex
• Environment – Production, Staging, Development
• Application – (if applicable) nginx, mongodb, ssh,
• Description – Short description of why this security group is needed
• Also Security Groups support per entry level descriptions
Routing Table
• Name – {environment}-{availability}-{platform}-{accessibility}-rtb
• E.g. prd-pub-warehouse01-pmry-rtb, stg-pvt-ecommerce-sdry-rtb
• Accessibility – pub, pvt, sec
• Platform – warehouse, ecommerce, publications, internal
• Environment – Production, Staging, Development
• Description – Short description of why this routing table is needed
• Availability (Zone)– Primary(a), Secondary(c), Tertiary(b),
• Some regions only has ‘a’ and ‘c’ zones

More Related Content

Similar to AWS Best Practices Version 2 (20)

PPTX
Modernizing your AWS Deployment - January 2017
CloudHesive
 
PPTX
AWS 101 - An Introduction to the Amazon Cloud
CloudHesive
 
PPTX
Adopting AWS in your organization - ITPalooza 2015
CloudHesive
 
PPTX
Cloud Service.pptx
SibinBharathi
 
PDF
DEF CON 24 - Rich Mogull - pragmatic cloud security
Felipe Prado
 
PPTX
Windsor AWS UG Virtual Private Cloud
Goran Karmisevic
 
PDF
Aws Architecture Fundamentals
2nd Watch
 
PPTX
AWS VPC Fundamentals- Webinar
Amazon Web Services LATAM
 
PDF
Aws Architecture Fundamentals
2nd Watch
 
PPTX
AWS Introduction
arconsis
 
PPTX
AWS Introduction
Dimosthenis Botsaris
 
PDF
002 AWSSlides.pdf
DrBashirMSaad
 
PDF
Cloud 101: Your Gateway to Computing Freedom With AWS
Shivanshi Singh
 
PPTX
AWS GLOBAL INFRA AND SERVICE LIST01.pptx
susilmoharana621
 
PDF
Migrate and Govern Applications on Cloud Infrastructure
Manuj Bawa
 
PDF
AWS BaseCamp: AWS Architecture Fundamentals
Nicole Maus
 
PDF
Cloud Native Computing - Part II - Public Cloud (AWS)
Linjith Kunnon
 
PDF
AWS System Administration Best Practices for Sysadmins in the Amazon Cloud 1s...
pulbzlod930
 
PDF
AWS Architecture Fundamentals - Houston
Nicole Maus
 
PDF
Fabio Cecaro - SMAU Napoli 2017
SMAU
 
Modernizing your AWS Deployment - January 2017
CloudHesive
 
AWS 101 - An Introduction to the Amazon Cloud
CloudHesive
 
Adopting AWS in your organization - ITPalooza 2015
CloudHesive
 
Cloud Service.pptx
SibinBharathi
 
DEF CON 24 - Rich Mogull - pragmatic cloud security
Felipe Prado
 
Windsor AWS UG Virtual Private Cloud
Goran Karmisevic
 
Aws Architecture Fundamentals
2nd Watch
 
AWS VPC Fundamentals- Webinar
Amazon Web Services LATAM
 
Aws Architecture Fundamentals
2nd Watch
 
AWS Introduction
arconsis
 
AWS Introduction
Dimosthenis Botsaris
 
002 AWSSlides.pdf
DrBashirMSaad
 
Cloud 101: Your Gateway to Computing Freedom With AWS
Shivanshi Singh
 
AWS GLOBAL INFRA AND SERVICE LIST01.pptx
susilmoharana621
 
Migrate and Govern Applications on Cloud Infrastructure
Manuj Bawa
 
AWS BaseCamp: AWS Architecture Fundamentals
Nicole Maus
 
Cloud Native Computing - Part II - Public Cloud (AWS)
Linjith Kunnon
 
AWS System Administration Best Practices for Sysadmins in the Amazon Cloud 1s...
pulbzlod930
 
AWS Architecture Fundamentals - Houston
Nicole Maus
 
Fabio Cecaro - SMAU Napoli 2017
SMAU
 

Recently uploaded (20)

PPTX
Research Design - Report on seminar in thesis writing. PPTX
arvielobos1
 
PPTX
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
PDF
The Power and Impact of Promotion most useful
RajaBilal42
 
PPTX
ZARA-Case.pptx djdkkdjnddkdoodkdxjidjdnhdjjdjx
RonnelPineda2
 
PPT
introductio to computers by arthur janry
RamananMuthukrishnan
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PDF
Technical Guide to Build a Successful Shopify Marketplace from Scratch.pdf
CartCoders
 
PPTX
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
PDF
Internet Governance and its role in Global economy presentation By Shreedeep ...
Shreedeep Rayamajhi
 
PPTX
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
PPTX
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
PPTX
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
PPTX
unit 2_2 copy right fdrgfdgfai and sm.pptx
nepmithibai2024
 
PPTX
ipv6 very very very very vvoverview.pptx
eyala75
 
PPTX
Random Presentation By Fuhran Khalil uio
maniieiish
 
PDF
123546568reb2024-Linux-remote-logging.pdf
lafinedelcinghiale
 
PDF
Digital Security in 2025 with Adut Angelina
The ClarityDesk
 
PPTX
Presentation on Social Media1111111.pptx
tanamlimbu
 
PDF
The Complete Guide to Chrome Net Internals DNS – 2025
Orage Technologies
 
Research Design - Report on seminar in thesis writing. PPTX
arvielobos1
 
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
The Power and Impact of Promotion most useful
RajaBilal42
 
ZARA-Case.pptx djdkkdjnddkdoodkdxjidjdnhdjjdjx
RonnelPineda2
 
introductio to computers by arthur janry
RamananMuthukrishnan
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
Technical Guide to Build a Successful Shopify Marketplace from Scratch.pdf
CartCoders
 
本科硕士学历佛罗里达大学毕业证(UF毕业证书)24小时在线办理
Taqyea
 
Internet Governance and its role in Global economy presentation By Shreedeep ...
Shreedeep Rayamajhi
 
Cost_of_Quality_Presentation_Software_Engineering.pptx
farispalayi
 
西班牙武康大学毕业证书{UCAMOfferUCAM成绩单水印}原版制作
Taqyea
 
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
unit 2_2 copy right fdrgfdgfai and sm.pptx
nepmithibai2024
 
ipv6 very very very very vvoverview.pptx
eyala75
 
Random Presentation By Fuhran Khalil uio
maniieiish
 
123546568reb2024-Linux-remote-logging.pdf
lafinedelcinghiale
 
Digital Security in 2025 with Adut Angelina
The ClarityDesk
 
Presentation on Social Media1111111.pptx
tanamlimbu
 
The Complete Guide to Chrome Net Internals DNS – 2025
Orage Technologies
 
Ad

AWS Best Practices Version 2

  • 1. AWS Primer on Best Practices and Resource Tagging Convention Kenichi Shibata
  • 2. Why do we need naming convention? • Tagging for Deployment • Tagging based on application usage • Tagging based on ownership • Tagging for cost structure (can check cost breakdown based on tags) • Have to enable cost breakdown on the aws billing (usecase: for individual clients) • Tagging for Automation • All resources will be tagged and then can filtered or queried via tags • Tagging as context helpers • Not all resources are tagged appropriately by AWS and it could be confusing for understanding what a specific resource does
  • 3. Naming Best Practices • Before we begin we have understand some key points in order to better maintain the infrastructure in the cloud 1. Build infrastructure to scale • This means that the infrastructure you handle right now will need to passed over very quickly to a new engineer for a minimal training with only documentation and the context. • Contexts should be provided with each resources to be able to identify how the resource fit in; 2. Automate all/most infrastructure tasks • Use Automation tools like cloudformation, boto3 or terraform for provisioning • If tasks is repeated at least thrice we should automate it. • Orchestration should be done automatically using config/template management like packer, ansible. • Use Infrastructure-As-A-Code whenever you run a new cluster • Tags should be automated
  • 4. Deployment Best Practices 3. Centralized jobs • All cron jobs should be observable and should be visible to all devOps team. A local cron job for a specific server is discouraged. • Centralized jobs can help manage the workload among the Ops team and create a sense of teamwork when rotating tasks, It helps gain visibility ensures quick and efficient action when something unexpected occurs 4. Pipelined Tasks • Tasks like continuous integration and deployment should be pipelined in order to find out at which stage the task failed, • Infrastructure As A Code should be the norm when deploying new infrastructure. These tasks deployment should be pipelined within the centralized observable pipeline 5. Containerized/AMI Deployments • Blue Green Deployment should be done to each servers in order to test the code in a production like setting • Deployments to each new Instance should be done by using a snapshot of a proven instance running an application that starts on bootup • Running Clusters of Containers is Recommended however please keep in mind the overhead of running containers
  • 5. Security Best Practices 6. Use MFA for all Users and set harder restrictions on password • Every engineer who has access to the AWS Console should have MFA enabled • The passwords policy can be configured from the IAM Console, The passwords should at least have one uppercase and one number. 7. Not Everyone should have access to the console • Developers who will only need a specific access can use the Command Line Interface with AWS AccessKey and SecretKey instead, • Use the principle of least privilege and only give access to specific resource, For example instead of giving write access to all s3 buckets, Only give list access and write access to a specific s3 bucket 8. Turn on CloudTrail • Get all the audit logs for each calls to the aws api using your account credentials
  • 6. Resource Types • Currently this document covers the following resource types • EC2 • VPC • VPC Subnet • Sec Group • S3 • Routing Table
  • 7. EC2 • Name – naming convention – {env/owner(count)-cluster-app} • e.g. mng01-infra-bastion, prd-web-abcd, acmecorp01-infra-yourapp1 • Environment – stg, dev, prd, mng • Cluster/Platform – Infra Management, ecommerce, crm,projectcode1 , (optional) • App – app1proxy, app1loadbalancer, app1api • Tier – Database, Web, API, App, Datastore, (for multi tiered architectures) • Subnet – {subnet-name} should be queried on terraform • Owner – {customer1} if owned by third party (optional) • Maintainer –email • Architecture- /Diagrams/file.uml, http://wiki (optional) • Count – 01, 02, 03 (for asg use e.g. prd01-web-app-asg) else use prd01-web-app
  • 8. EC2 • Why is name prefixed on client instead of env when it is available? • We assume that the clients will always have production environment afforded to them if they will need to test or do acceptance test we can set it up on staging or development environments to share costs, using data encryption for the test data if need be. • e.g. mng01-infra-bastion, prd-web-abcd, acmecorp01-infra-yourapp1
  • 9. VPC • Name – {platform}(count)-{tenancy}-vpc e.g. warehouse01-default-tokyo-vpc • Tenancy – Default/Dedicated • Count – 01, 02, 03 (You can also use names as instead of numbers) • Region – Use the common region name not the aws official name for brevity • Platform – Ecommerce, Warehouse management, CRM, projectcode1 • Most application platforms will be inside a single vpc so the name of the platform will suffice. However if we will need to scale to multiple regions, We will need to tag the Region as well to provide context where we would like to run this specific platform.
  • 10. VPC Subnet • Name – {environment}-{availability}-{platform}-{accessibility}(count)-subnet • E.g. prd-pub-warehouse01-pmry-subnet, stg-pvt-ecommerce-sdry-subnet • Accessibility – Private, Public, Secured • Maintainer – email • Platform – Ecommerce, Warehouse management, CRM, projectcode1 • Cluster - DB, Web, API, App • Environment – prd, stg, dev, mng • Availability (Zone)– Primary(a), Secondary(c), Tertiary(b), • Some regions only has ‘a’ and ‘c’ zones
  • 11. What is public/private/secured? • Public subnets are subnets which are directly connected to the internet using an internet gateway or a egress only internet gateway • There is a use case for a public -> nat -> public mapping of subnets if you want to whitelist all requests from a specific subnet • Public Subnets are best used for Internet facing Web Servers • They need a public ip address or elastic ip in order to connect • Usually the HTTPs termination is done on server running on public subnets • Private subnets are subnets which are connected to the internet using a NAT Gateway (network address translation) • The subnets are usually mapped using private -> nat -> public. However the limitation to these subnets are that they cannot serve traffic from Public DNS without port forwarding. • They are best suited for cache servers, database servers, middleware api, and secured transaction interfaces,
  • 12. What is public/private/secured? • Secured Gateways • Secured Gateways are for directly connecting a specific IP Address to another IP Address. Without connecting to the rest of the internet, It is usually done by Network ACL. • A good alternative for Secured Gateways is AWS Direct Connect or AWS VPN Connection
  • 13. NAT Gateways • The best practice in running NAT Gateway is using the AWS NAT Gateway it scales depending on traffic and is easier to setup than a manual EC2 NAT Gateway • however please be aware that since AWS NAT Gateway is a full managed service it is bound to limitations as well, Port forwarding for example is not supported as is sniffing logs from the gateway • To be able to get advanced functionality creating NAT Gateway from EC2 is needed however setting a single EC2 instance as a NAT Gateway is an anti- pattern since if the traffic grows enough then the NAT EC2 Instance will become a bottleneck • It is recommended to have a failover or a load balanced NAT Gateway if you are going to use EC2
  • 14. S3 • Name – {company-name}-{environment}-{platform}-{application} • (S3 name is global and should be unique globally, so we add the company name or abbrev) • E.g. acme-prd-warehouse-stockinventory • Platform – Ecommerce, Warehouse management, CRM, projectcode1 • Application – Logs, Webapp, Webpage • Environment – prd, stg, dev, admin • File Naming – Inside the bucket please use random string to generate hashes if there are lots of files. AWS Stores files in different servers using file name hashes, it is faster to retrieve and store with more servers
  • 15. Security Group • Name – {environment}-{accessibility}-{application/protocol}-{direction}-sg • E.g. prd-pvt-icmp-dx-sg, dev-pub-http-in-sg • Group Name – same as name (required by aws) • Protocol – ICMP, TCP, UDP • Accessibility – pub, pvt, sec • Direction – Inbound, Outbound, Duplex • Environment – Production, Staging, Development • Application – (if applicable) nginx, mongodb, ssh, • Description – Short description of why this security group is needed • Also Security Groups support per entry level descriptions
  • 16. Routing Table • Name – {environment}-{availability}-{platform}-{accessibility}-rtb • E.g. prd-pub-warehouse01-pmry-rtb, stg-pvt-ecommerce-sdry-rtb • Accessibility – pub, pvt, sec • Platform – warehouse, ecommerce, publications, internal • Environment – Production, Staging, Development • Description – Short description of why this routing table is needed • Availability (Zone)– Primary(a), Secondary(c), Tertiary(b), • Some regions only has ‘a’ and ‘c’ zones