Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MJ Berends talk - Women & Non-Binary Focused Intro to AWS

508 views

Published on

"how to develop for aws on your local machine using localstack / moto" - MJ Berends, Data Apps Team Lead at Jellyvision // @apprxlinear (https://twitter.com/apprxlinear)

Published in: Technology
  • Be the first to comment

MJ Berends talk - Women & Non-Binary Focused Intro to AWS

  1. 1. Local AWS Development with LocalStack and Moto MJ Berends
  2. 2. Intro MJ Berends • Engineering Team Lead at Jellyvision • Still overwhelmed by AWS • She/her Jellyvision • Talks people through big life decisions • Lets me learn lots about AWS approximatelylinear @apprxlinear • www.jellyvision.com @JellyvisionLab
  3. 3. So, you want to run your code. (And also share it with others. Maybe in a web page?) A couple options: • A machine you own • AWS
  4. 4. Your Machine Great! • Total Control • Familiar • The way you like it Meh. • Limited resources • Inaccessible to others • Hard to replicate
  5. 5. AWS Great! • Run code in the cloud • Scale out • Delegate server maintenance • Cheap Meh. • Proprietary services • Unfamiliar environments • Managing security
  6. 6. Interlude: Alphabet soup ! Service Quick Blurb S3 (Simple Storage Service) Cheap object-based storage DynamoDB NoSQL database with fast and scalable single- item lookups SNS (Simple Notification Service) Pushes messages to multiple destinations SQS (Simple Queue Service) Buffers messages until there’s processing capacity EC2 (Elastic Compute Cloud) General-purpose machine that will run any program you want it to
  7. 7. Example: Let’s make a Dropbox! Local System AWS
  8. 8. Ack! So Different! AWS Open Source Compute • EC2 • A CPU + Python Storage • DynamoDB • S3 • MySQL • Filesystem Transport • SNS • SQS • RabbitMQ Presentation • S3 webpage • Nginx + Nodejs Nevertheless, AWS is... • Managed • Scalable • Easy-to-configure ...and their services play nicely with each other!
  9. 9. Let’s recap: Different approaches Local development cycle Use any tool you want, as long as it runs on your OS AWS development cycle Use a combination of proprietary, open-source, and AWS-specific tools
  10. 10. Approaches • What are ways of resolving this tension?
  11. 11. 1. Don’t use any AWS-specific services Use your own services in both your local environment and on your servers. (Deploy this code to EC2 instances in AWS, which you have complete control over.)
  12. 12. 2. Split codebase • Maintain AWS-specific and local development versions • Find alternatives to AWS-specific services for local dev • Let ops maintain anything AWS-specific • Develop against an AWS sandbox in limited cases
  13. 13. 3. Use AWS everywhere you can • Use AWS services in all environments, both cloud and local • Find local versions of AWS code. Use them. • And also use real AWS services in the cloud
  14. 14. Scorecard Great! Meh. Nothing by AWS, thank you Same code runs everywhere Need to manage everything yourself Keep my codebases separate, please N/A Different code in different places AWS everywhere! Same code runs everywhere Does this really work? Won’t there be subtle differences? I can’t have everything the same, can I?
  15. 15. Local Dev Tools Localstack https://github.com/localstack/localstack A fully functional local AWS cloud stack. Develop and test your cloud apps offline! (Backed by Atlassian) Moto https://github.com/spulec/moto Moto is a library that allows your python tests to easily mock out the boto library Easy to install Clear docs Coverage Robustness Attention Localstack ✅ ⚠ 15+ ⚠ Moto ✅ ✅ 30+ ✅
  16. 16. What’s in a Localstack? Localstack Moto <Lots others> ElasticMQ SQS Kinesalite Kinesis Local DynamoDB Elasticsearch LocalStack is based on Moto! ❗
  17. 17. Localstack What can you do? • Run many common AWS services locally, including S3, DynamoDB, SNS, and SQS. • Develop application logic that utilizes those AWS services • Simulate failure scenarios, such as services outages or capacity limits What can’t you do? • Run other services outside the set already implemented • Test networking features, like VPCs or CORS • Test access controls, roles, or permissions
  18. 18. Interlude: How do you access AWS? Console • Online GUI • Detailed tutorials CLI • Text interface • Use in the shell SDK • Integrates with code • Many languages available
  19. 19. Localstack Usage Installation •pip install localstack Usage •localstack start Interaction • CLI or SDK actions (Or, run in Docker)
  20. 20. CLI Example: Create an SQS Queue Just set the --endpoint-url to the Localstack url for the service So magic ✨
  21. 21. Development Process • Design Applica-on logic • Familiarize yourself with services • Build applica-on prototype using services • Test Services in AWS
  22. 22. Design application logic • Identify candidates for AWS services
  23. 23. Familiarize yourself with services • Explore AWS CLI tutorials • Run Localstack and point AWS CLI toward instance, and try things out!
  24. 24. Build application prototype Test locally Prototype the interaction of application logic with AWS services Test in AWS Explore permissions, networking, and application load
  25. 25. Test Services in AWS sandbox • Replace localstack endpoint with Sandbox endpoint • Add ”real” configurations • Networking • Access controls • CORS • Disaster recovery • Multiregion support
  26. 26. Recommendation Keep learning! Use Localstack for exploring services and doing initial prototype Keep building! Don’t be afraid of AWS services! You can keep dev versions closely coupled with applicaAon producAon versions
  27. 27. Thank you! • Thanks to AWS Chicago for hosting! And also... • AWS for SO MANY neato products • Localstack (https://github.com/localstack/localstack) • Moto (https://github.com/spulec/moto) • Open-source contributors everywhere And, of course, everyone here!
  28. 28. Questions? • Yes, please!

×