1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-26 10:43:35 +02:00
awesome-compose/localstack
ulises-jeremias 727c96f2e8 Update README.md with LocalStack Desktop information
Signed-off-by: ulises-jeremias <ulisescf.24@gmail.com>
2024-01-19 00:06:44 -03:00
..
init.d Update localstack configuration 2024-01-19 00:06:44 -03:00
.gitignore Added localstack example using docker compose 2024-01-19 00:06:44 -03:00
compose.yml Update localstack configuration 2024-01-19 00:06:44 -03:00
README.md Update README.md with LocalStack Desktop information 2024-01-19 00:06:44 -03:00

LocalStack

This example shows how to use LocalStack to emulate AWS services locally using docker compose.

Project structure:

.
├── init.d/
│   └── init.sh
├── compose.yaml
└── README.md

compose.yaml

services:
  localstack:
    image: localstack/localstack:2.3.2
    ports:
      - "4566:4566" # LocalStack Gateway
      - "4510-4559:4510-4559" # external services port range
    ...

Deploy with docker compose

docker compose up -d

It will execute the scripts located in the init.d/ folder to bootstrap the resources.

Resources

Once the docker compose is up, it will create the following resources:

LocalStack Desktop

You can use LocalStack Desktop to manage the resources created by the docker compose.

Testing the services

From outside the container you can execute the following commands to test the service each service:

  • DynamoDB
$ awslocal dynamodb list-tables
{
    "TableNames": [
        "my_table"
    ]
}
  • Kinesis
$ awslocal kinesis list-streams
{
    "StreamNames": [
        "my_stream"
    ]
}
  • S3
$ awslocal s3 ls
2022-08-08 03:16:01 example-bucket
  • SQS
$ awslocal sqs list-queues
{
    "QueueUrls": [
        "http://localhost:4566/000000000000/my_queue"
    ]
}