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.
LocalStack and AWS Parity Explained
21–30 of 40 posts
Re: LocalStack and AWS Parity Explained
#22Does 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, LocalSt…
Re: LocalStack and AWS Parity Explained
#23LocalStack 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.
Quoted post unavailable.
Re: LocalStack and AWS Parity Explained
#24LocalStack 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.
Re: LocalStack and AWS Parity Explained
#25I 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.
Re: LocalStack and AWS Parity Explained
#26LocalStack 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.
Quoted post unavailable.
Re: LocalStack and AWS Parity Explained
#27Earlier quoted context omitted.
Quoted post unavailable.
Mocks and adaptations such as localstack and serverless can be equally leaky or incomplete. You don't really know until you hit the real stage if what you've got is ready.
by default they have it so S3 requests with wrong headers are still sent
I didn't know this and one day I changed the send header but not receive header
Turned out the cache-control was wrong when uploading an image to a presigned url, but this was never caught until it hit staging env since local tests and CI/CD tests showed a pass
Re: LocalStack and AWS Parity Explained
#28I 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.
Can you actually spin up local "ec2" vms with localstack? If so does it go as far as launching a KVM instance?
Re: LocalStack and AWS Parity Explained
#29Earlier quoted context omitted.
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, LocalSt…
Thanks for the detailed reply. Would I be able to take most, if not all, of my existing Terraform code and use it to stand up my topology in LocalStack? If so, that would be quite useful.
Here is the list: https://docs.localstack.cloud/aws/feature-coverage/