I've been running a scraper against the output of the "aws --help" CLI commands for a few months, to try and get a better feel for how often AWS changes - I call this "help scraping". The answer is it changes a LOT - there are updates to their APIs every single day.
Does LocalStack allow me to actually mimic my entire infrastructure and services on AWS? Say I have a VPC with public/private subnets, a NATGW, ECS on EC2, ELBs, etc — can I mimic this infra in its entirety on LocalStack?
Does LocalStack allow me to actually mimic my entire infrastructure and services on AWS? Say I have a VPC with public/private subnets, a NATGW, ECS on EC2, ELBs, etc — can I mimic this infra in its entirety on LocalStack?
You can definitely emulate parts of this. For example LocalStack can spawn ECS tasks using Docker, or EC2 VMs using something like VirtualBox. Load balancers are also emulated, so you can test load balancing configurations with IP address or Lambda targets. LocalStack is currently not emulating all of the VPC network configuration, so although you can make the API calls to create VPCs subnet groups and so on, LocalStack currently wouldn't enforce these on a network level.
I used LocalStack quite a bit at my last gig. It sure is nice to be able to use Terraform to spin up the same infra on my laptop, and test against that. It reduced the number of developer sandboxes we needed to have in AWS. I sure do wish AWS would go the GCP route and offer an emulator. I prefer to use that in E2E automation that's run in CI/CD pipelines.
What's the difference between what localstack provides and an emulator as you describe? Just support, or do they do different things?
LocalStack is a third party that has a free and paid version of their product. I'm certainly NOT against anyone trying to make a living off of their own hard work but, Google provides their emulator free of charge. Supposedly this can drive greater adoption.
I used LocalStack quite a bit at my last gig. It sure is nice to be able to use Terraform to spin up the same infra on my laptop, and test against that. It reduced the number of developer sandboxes we needed to have in AWS. I sure do wish AWS would go the GCP route and offer an emulator. I prefer to use that in E2E automation that's run in CI/CD pipelines.
any chance you can point to a good overview on how to do this? im new to terraform and i'm trying to figure out the best way to co about local/sandbox testing
What's the difference between what localstack provides and an emulator as you describe? Just support, or do they do different things?
LocalStack is a third party that has a free and paid version of their product. I'm certainly NOT against anyone trying to make a living off of their own hard work but, Google provides their emulator free of charge. Supposedly this can drive greater adoption.
GCP emulators cover only a very small portion of their services though. AWS also has emulators for some services they provide free of charge. LocalStack adds more than just emulation though, it has a bunch of developer tools that enables local cloud dev much more broadly.
I used LocalStack quite a bit at my last gig. It sure is nice to be able to use Terraform to spin up the same infra on my laptop, and test against that. It reduced the number of developer sandboxes we needed to have in AWS. I sure do wish AWS would go the GCP route and offer an emulator. I prefer to use that in E2E automation that's run in CI/CD pipelines.
they provide a local dynamodb implementation...i dream of a day when they offer the rest.
The scope of this project is very impressive. I don't have a need for it myself at this point, but kudos for having even a semblance of parity with AWS for local development.
This is really impressive. I've been running a scraper against the output of the "aws --help" CLI commands for a few months, to try and get a better feel for how often AWS changes - I call this "help scraping". The answer is it changes a LOT - there are updates to their APIs every single day. Here's the commit log of changes I've tracked so far: https://github.com/simonw/help-scraper/commits/main/aws
LocalStack is cool, but don't forget that you always have an alternative to build mock infrastructure in front of your AWS deps. Don't call S3 deps directly - implement a higher abstraction using only the APIs you actually call and back it with your local filesystem (for example).
It's not a _lot_ of work, and making your dev/prod differences more explicit can make debugging much easier.