Skip to content

Instantly share code, notes, and snippets.

@harrisn6
Last active May 8, 2020 05:53
Show Gist options
  • Save harrisn6/e3b3bd31f9022486337df09833d3bdc2 to your computer and use it in GitHub Desktop.
Save harrisn6/e3b3bd31f9022486337df09833d3bdc2 to your computer and use it in GitHub Desktop.
Architecting on AWS (Class Notes / Resources)
Day 1
• Cloud Computing - Why It matters? Simon Wardley: https://www.youtube.com/watch?v=okqLxzWS5R4
• ReInvent 2016 – James Hamilton: https://www.youtube.com/watch?v=AyOAjFNPAbA
• Pets vs Cattle – Randy Bias: http://cloudscaling.com/blog/cloud-computing/the-history-of-pets-vs-cattle/
• EBS Deep Dive – Dougal Ballantyne:
• Deep Dive – Direct Connect / VPN:
Day 2
• AWS Shell: https://github.com/awslabs/aws-shell
• Plain Text Introduction to CAP Theorum: http://ksat.me/a-plain-english-introduction-to-cap-theorem/
• The ATOM CFORM Package - https://atom.io/packages/atom-cform
• https://github.com/awslabs/aws-cfn-template-flip
• Deploying Lambda – the serverless framework: https://serverless.com/
• CI/CD Pipelines for Lambda – Serverless SAM - How to Do Continuous Integration and
Continuous Deployment with AWS Lambda and AWS CodePipeline
• API Gateway : AWS re:Invent 2015 | (DEV203) Amazon API Gateway & AWS Lambda to
Build Secure and Scalable APIs
• How to Do Continuous Integration and Continuous Deployment with AWS Lambda and AWS CodePipeline
• Deploying Lambda with SAM – serverless application model
• API Gateway
Day 3
• Vimeo; Cost saving through spot instances : http://www.slideshare.net/ptrmcrthr /vimeo-ec2
• Internal ONLY - EC2 networking under the hood : https://broadcast.amazon.com/videos /45428
• Architecture guide. Native Amazon services: https://w.amazon.com/index.php /BuilderTools/NativeAWS/BONES
• https://blog.gorillastack.com/gorillastack-presents-auto-tag/
• Implementing CIS security Benchmarks on AWS ( PDF / AWS Labs CFN )
Class Questions
Day 1
Spot Instances
Create a Spot instance request that includes the maximum bid price that you are willing to pay per hour per instance (B), and other constraints such as the instance type and Availability Zone.
When a Spot Instance is launched you will pay the current market price at the time of launch. AWS re-evaluates this market price every hour, on the hour, and adjusts the billing for your instance after each hour of run time. So if you bid 20 cents and the market price is 10 cents, you pay 10 cents for the hour.
Amazon EC2 can interrupt your Spot instance when the Spot price rises above your bid price, when the demand for Spot instances rises, or when the supply of Spot instances decreases.
Amazon EC2 marks a Spot instance for termination, it provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
f AWS terminates your instance and you are partially through your hour, you do not pay for the partial hour.
• http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html
• https://forums.aws.amazon.com/message.jspa?messageID=213375
• https://stackoverflow.com/questions/37479874/what-price-do-i-eventually-pay-for-a-aws-
spot-instance-and-do-i-drive-up-the-pri
Encryptiion on Gllaciier
By default. Yes, all data in the service will be encrypted on the server side. Amazon Glacier handles key management and key protection for you. Amazon Glacier uses one of the strongest block ciphers available, 256-bit Advanced Encryption Standard (AES-256). 256-bit is the largest key size defined for AES. Customers wishing to manage their own keys can encrypt data prior to uploading it.
https://aws.amazon.com/glacier/faqs/
Use of Route 53 wiith Resources Externall to AWS
You can create a Route 53 resource record that points to an address outside AWS,
You can set up health checks for parts of your application running outside AWS, and you can fail over to any endpoint that you choose, regardless of location.
Example, use R53 to route users to an Internet facing web app running in a datacenter and failover to a backup instance of that application running within AWS.
https://aws.amazon.com/route53/faqs/ http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html
Route 53 Routiing Polliiciies – GeoLocatiion
Note on Geolocation. When clients execute DNS queries, it is possible that Route 53 may be unable to determine the location of the client issuing the DNS query. You can create a default record that handles both queries from IP addresses that aren't mapped to any location and queries that come from locations that you haven't created geolocation records for.
http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing- policy-geo
Why not use 2 VGWs ?
https://serverfault.com/questions/643860/connecting-two-aws-regions-why-not-use-two- virtual-private-gateways
Day 2
Example command line pulling data from CloudWatch
aws cloudwatch get-metric-statistics --metric-name CPUUtilization --start-time 2017-07-18T19:00:00 --end-time 2017-07-18T20:15:00 --period 300 --namespace AWS/EC2 --statistics Maximum --dimensions Name=InstanceId,Value=i-0a34c327177eb881e
Q– What is the cost of Cloudwatch Events? A - $1.00 per million custom events generated
https://aws.amazon.com/cloudwatch/pricing
Day 3
Pre-caching on CloudFront
Here is a forum post regarding pre-warming. If everyone pre-cached objects to a edge location all of the edge locations would run out of space because they would be flooded with objects that may or may not be being accessed. Right now the edge location only caches objects that are being accessed by users and will dump objects that have no been accessed recently if there is no
more room on the server.
Unless you know that you're going to be getting a steady flow of traffic over an extended period of time then pre-warming simply may not be effective. CloudFront may very well expire your objects to make room for other customers objects if they're getting more (or more recent) traffic than your own. If you do want to pre-warm your caches, it looks like this Warmfront project on github can help automate that process for you from the client-side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment