Live data from Hacker News

LocalStack and AWS Parity Explained

localstack.cloud

21–30 of 40 posts

Re: LocalStack and AWS Parity Explained

#21

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.

No post body was provided.

Re: LocalStack and AWS Parity Explained

#22
post #13

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, 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.

Re: LocalStack and AWS Parity Explained

#23

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.

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.

Re: LocalStack and AWS Parity Explained

#24

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.

Or just throw minio on a box somewhere

Re: LocalStack and AWS Parity Explained

#25
post #5

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.

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

#26

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.

Quoted post unavailable.

"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

Re: LocalStack and AWS Parity Explained

#27

Earlier 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.

anecdotal evidence

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

#28
post #25
post #5

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.

Can you actually spin up local "ec2" vms with localstack? If so does it go as far as launching a KVM instance?

localstack pro will spin up a container as if it was an ec2 and it will act like an ec2 instance as far as localstack is concerned.

Re: LocalStack and AWS Parity Explained

#29
post #13

Earlier 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.

yes, if you pay for localstack Pro, and "maybe" if you don't. they have a list of services they emulate on their site.

Here is the list: https://docs.localstack.cloud/aws/feature-coverage/

Post reply on HN