Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Seamless AWS Development and Testing Locally

Seamless AWS Development and Testing Locally

Intro to LocalStack and sample app that demos the drop-in AWS replacement.

Anca Ghenade

June 08, 2024
Tweet

More Decks by Anca Ghenade

Other Decks in Programming

Transcript

  1. 2. Developing on a local machine, you soon find out

    that there are lots of dependencies with resources in the cloud
  2. 3. You realize that the dev & test loop is

    extremely slow and tedious. Every local change needs to be packaged and uploaded to the cloud for testing.
  3. 4. You have a red build on your feature branch,

    but can’t efficiently test and debug the code in the CI/CD pipeline.
  4. 5. The whole team is using Git flow for development

    - one CI build per feature branch. There is an explosion of different environments required for development (branches x developers).
  5. 6. Your manager approaches the team and complains that AWS

    dev/test resources are not being cleaned up properly causing cost spikes.
  6. Additional pain points: You’re working in environments that have concerns

    about: • Security • Regulatory compliance • Data Sovereignty • Risk Management * We’re talking about banking and healthcare especially here.
  7. • Enables a highly efficient dev & test loop for

    cloud apps • Ships as a Docker image, easy to install and start up • Support for a growing number of services: ◦ compute (Lambda, ECS, EKS) ◦ various databases (DynamoDB, RDS) ◦ messaging (SQS, Kinesis, MSK) ◦ some sophisticated/exotic APIs (Athena, Glue) • CI integrations & advanced collaboration features ◦ redefining the way cloud apps are developed across the lifecycle. • Support for practices like chaos engineering, ephemeral environments for PRs.
  8. Business Logic: • Shipment entities • The shipment has weight

    defined (for ship/plane calculations) • We need to add the size as a picture • For size we’re using the IIS (Internet International System) “Banana for scale”
  9. Technical recap • Bean configuration - using Java @Configuration classes

    • Java AWS SDK - helps interaction with resources • Spring Profiles - environment specific configuration • IaC via Terraform - consistency across environments
  10. You have reasons: • Most applications are complex in used

    resources • Creating resources is time consuming • Development cycles can be slow - costs developer time • Resources are tedious to clean up • If not disposed of properly, resources can be costly • Interaction between services can be slow on AWS
  11. YES

  12. How much of your system you can test Cloud emulation

    Full cloud emulation with service integration 3 Staging environments Highest fidelity because it actually runs in the cloud 4 Mocking Mock out cloud APIs 1 Service emulation Replace individual services with local versions 2 Testability of Cloud App Deployments
  13. AWS Parity • AWS Server Framework ◦ weekly runs to

    check parity ◦ makes heavy use of botocore • Snapshot testing • Metrics collection to track test coverage