-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.mock_aws.yml
More file actions
50 lines (49 loc) · 1.42 KB
/
docker-compose.mock_aws.yml
File metadata and controls
50 lines (49 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
services:
moto-server:
#used for s3, dynamodb, kinesis, secret manager
# lambda cannot be used, because its 3.11 (older)
image: motoserver/moto:latest
container_name: moto-server
ports:
- "4566:5000"
networks:
- test-network
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:5000/" ]
interval: 1s
timeout: 1s
retries: 30
lambda-api:
image: public.ecr.aws/lambda/python:3.13
container_name: lambda-api
ports:
- "4567:8080"
platform: linux/amd64
volumes:
- ../dist/lambda.zip:/tmp/lambda.zip:ro
environment:
- AWS_ACCESS_KEY_ID=dummy_key
- AWS_SECRET_ACCESS_KEY=dummy_secret
- AWS_DEFAULT_REGION=eu-west-1
- PYTHONPATH=/var/task
- AWS_ENDPOINT_URL=http://moto-server:5000
- DYNAMODB_ENDPOINT=http://moto-server:5000
- S3_ENDPOINT=http://moto-server:5000
- SECRET_MANAGER_ENDPOINT=http://moto-server:5000
- FIREHOSE_ENDPOINT=http://moto-server:5000
- LOG_LEVEL=INFO
entrypoint: /bin/sh
command:
- "-c"
- |
mkdir -p /var/task &&
python3 -m zipfile -e /tmp/lambda.zip /var/task &&
exec /usr/local/bin/aws-lambda-rie python3 -m awslambdaric eligibility_signposting_api.app.lambda_handler
networks:
- test-network
depends_on:
moto-server:
condition: service_healthy
networks:
test-network:
driver: bridge