This section explains how to set up and use the local development environment for working with infrastructure and services. The provided Makefile
includes various commands to manage the local stack and service infrastructure.
- Docker
- Docker Compose
- Terraform
- AWS CLI
To start LocalStack, which simulates AWS services locally, use the following command:
make setup-localstack
This command will start LocalStack using Docker Compose. LocalStack will be available at http://localhost:4566.
make destroy-localstack
This command will bring down the LocalStack Docker containers.
You can leverage the AWS CLI to interact with the simulated AWS services provided by LocalStack. For example, to list DynamoDB tables, use:
aws --endpoint-url=<service_endpoint> <aws_service_name> <aws_service_specific_command>
# Example:
aws --endpoint-url=http://s3.localhost.localstack.cloud:4566 s3 ls
http://localhost:4566/_localstack/health
How to get the gateway endpoint:
http://localhost:4566/restapis/d9cu2lbp28/example/_user_request_/orders
aws --endpoint-url=http://sqs.localhost.localstack.cloud:4566 sqs list-queues
aws --endpoint-url=http://lambda.localhost.localstack.cloud:4566 lambda list-functions