user1187968
user1187968

Reputation: 7986

AWS Docker Container for Local Development

I'm using AWS Dynamo DB, Lambda, ElastichSearch, ElasticCache(Redis). I want to bring all these services offline for local development. I wonder's is there a Docker container for all these services?

Upvotes: 4

Views: 2690

Answers (2)

RyanWilcox
RyanWilcox

Reputation: 13972

Perhaps! There's a (set of) Docker containers that claim they provide local implementations of popular AWS services: localstack.

Edit: For lambda specific things there's also Docker Lambda!

I've never actually used these Docker containers, but have wanted to. (But my development needs try to use commodity services instead of vendor specific. So MongoDB instead of DynoDB, and sure we might use ElastiCache to run our Redis cluster, but that just means in local development we can use Redis directly. Having said that, that's not everyone's cup of tea / maybe not possible for some things..)

Upvotes: 3

Yeshodhan Kulkarni
Yeshodhan Kulkarni

Reputation: 2943

We use docker for most AWS Services for local development except for AWS Lambda.

We use the service containers as below:

  • MySQL for RDS MySQL
  • Redis for ElastiCache
  • ElasticSearch for AWS ElasticSearch
  • fake-s3 for S3
  • ActiveMQ for mocking SQS and SNS topics (The implementation for SNS topics is a bit ugly, but abstracted out in one place with some if-else statements)

Most of our services make use docker-compose to start the dependent containers. We've included these containers on our build server too to run our integration tests.

In addition, most of the containers we are using needed some modifications to the original Docker file. So we had to push our changes to our own Docker repository, which we maintain using ECS.

For Lambda, we do not use a docker container as we start our own HTTP server locally to test and invoke the lambda function.

Been using this setup for over a year without any issues. You may also want to refer to this blog from IFTTT to get some more ideas around DNS resolution and how to make this effort better.

Upvotes: 2

Related Questions