AWS Series

Architecting for the Cloud: AWS Best Practices Notes

Onur Dayıbaşı
Published in
3 min readJul 30, 2018

--

AWS Best Practices article outlines IT pattern needs. It tells you what services are needed in IT, how AWS meets those needs.

Scalability

Scaling Vertically (CPU, RAM, IO, Network Capability Increase/Decrease)
Scaling Horizontally :

Stateless Applications (EC2, Lambda, etc..)

  • Push Model : ELB, AWS Route53
  • Pull Model : AWS SQS, Kinesis (Async Event-Driven)

Stateless Components

Session Data → Cookie → ServerSide LocalFile → DynamoDB, EFS, S3

Stateful Components

Session Affinity , S3, EFS, Databases,

Distributed Processing

Offline batch jobs scaled by using distributed data like Apache Hadoop, Amazon EMR → EC2 , Kinesis → EC2, Lambda …

Disposable Resources Instead Of Fixed Servers

Configuration Drift, Immutable Infrastructure

Instantiating Compute Resource

Bootstrapping (EC2, RDS), AWS OpsWorks (Chef/Puppet — Bash/PowerShell scripts, AWS API, CloudFormation)

Golden Images :( EC2, RDS, EBS) → AMI , VM Import/Export, AWS AMI Catalog, AWS Marketplace

Containers (Dockers) : ECS, ElasticBeanstalk → manages → dockers → on EC2 Clusters

Hybrid : Bootstrapping — Golden Images

Infrastructure As Code: AWS CloudFormation

Automation

AWS Elastic Beanstalk, Amazon Ec2 Auto Recovery, Auto Scaling, Amazon CloudWatch Alarms, Amazon CloudWatch Events, AWS OpsWorks Lifecycle events, AWS Lambda Scheduled Events

Loose Coupling

Well Defined Interfaces: RESTful APIs , Amazon API Gateway

Service Discovery : Elastic Load Balancing, DNS and Private Amazon Route53 Zones, AWS API , Netflix Eureka, Airbnb Synapse, HashiCorp Consul

Asynchronous Integration : Amazon SQS, or streaming Amazon Kinesis, Amazon SWF, or AWS Lambda consumes AWS Service events

Graceful Failure : Amazon Route53 DNS failover feature

Services, Not Servers

Managed Services: SQS, S3, CloudFront, ELB, DynamoDB, Amazon CloudSearch, Amazon Elastic Transcoder, SES, vb..

Serverless Architectures: AWS Lambda for Event-Driven and synchronous services mobile, web, analytics, IOT

Databases

Relational Databases : Amazon RDS

NoSQL Databases: Amazon DynamoDB

Data Warehouse : Amazon Redshift

Search : Amazon ES (Elastic Search), Amazon CloudSearh

Removing Single Points of Failure

Introducing Redundancy: Standby Redundancy (failover), Active Redundancy

Detect Failure : ELB , Route53 (health check)

Durable Storage : S3 (Sync Replication)

Automated Multi-Data Center Resillence: Availablity Zones

Fault Isolation And Traditional Horizantal Scaling

Shuffle Sharding

Optimizing Cost

Right Sizing

Select Instance Type for EC2, RDS, Redshift, ElasticCache, ES

Select Storage Type for S3, EBS

Elasticity

EC2 → AutoScaling

AWS Lambda → Auto

AWS Managed Service → Auto

Take Advantage Of The Variety of Purchasing Options

Reserved Instance, On Demand, Spot ..

Caching

Application Data Caching

AWS ElasticCache

Edge Caching

Amazon Cloudfront

Security

Utilize AWS Features for Defense in Depth

AWS WAF, IAM

Offload Security Responsibility to AWS

Shared Security Responsibility Model

Reduced Privileged Access

IAM, Amazon Cloud Watch Logs..

Security As Code:

IAM, AWS CloudFormation, AWS Service Catalog

Real-Time Auditing :

AWS Config, Amazon Inspector, AWS Trusted Advisor, CloudWath Logs)

Uzun süredir farklı sektörlerde (Askeri, Telekomünikasyon, Devlet, Bankacılık, Sigortacılık, Tübitak, SaaS) yazılımlar geliştiriyorum. Bu süreçte Havelsan, Milsoft, T2, Cybersoft ve Thundra firmalarında yönetici ve yazılım mühendisi olarak çalıştım. Deneyimlerimi ve teknolojik bilgi birikimi mi olabildiğince OnurDayibasi.com adresinde toplamaya çalışıyorum. Tüm yazılarıma ve daha fazlasını bu site üzerinden erişebilirsiniz.

--

--