Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: "3"
services:
dynamodb:
image: amazon/dynamodb-local:2.0.0
image: amazon/dynamodb-local:2.6.1
container_name: app-dynamodb
hostname: app-dynamodb
volumes:
Expand All @@ -11,12 +10,18 @@ services:
- "8000:8000"
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ."
restart: unless-stopped
networks:
- db-network

dynamodb_migrator:
image: amazon/aws-cli:2.13.6
image: amazon/aws-cli:2.31.28
container_name: app-dynamodb_migrator
working_dir: /home/dynamodblocal
command: dynamodb create-table --cli-input-json file://paste.json --endpoint-url http://dynamodb:8000
entrypoint: ["/bin/sh", "-c"]
command:
- |
sleep 5
aws dynamodb create-table --cli-input-json file://paste.json --endpoint-url http://app-dynamodb:8000
volumes:
- ./schema:/home/dynamodblocal
environment:
Expand All @@ -25,7 +30,15 @@ services:
- AWS_DEFAULT_REGION=local
depends_on:
- dynamodb
restart: on-failure
networks:
- db-network

volumes:
app_dynamodb:
driver: local

networks:
db-network:
driver: bridge

2 changes: 1 addition & 1 deletion local/events/get.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"queryStringParameters": {
"id": "f679e04f75bb74285359000765ea2af86adb198a"
"id": "10a04c0b8c91a4bd996efa6b22beda1aab08f210"
},
"httpMethod": "GET",
"path": "/",
Expand Down
2 changes: 1 addition & 1 deletion local/events/post.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"content": "examplary job",
"content": "focuse on efficiency",
"httpMethod": "POST",
"path": "/",
"requestContext": {
Expand Down
6 changes: 3 additions & 3 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.98.0"
version = "5.92.0"
}
random = {
source = "hashicorp/random"
version = "3.7.2"
version = "3.7.1"
}
archive = {
source = "hashicorp/archive"
version = "2.7.1"
version = "2.7.0"
}
local = {
source = "hashicorp/local"
Expand Down
Loading