Skip to content

Commit a092651

Browse files
Merge pull request #109 from socraticDevBlog/20251103-upgradeawslocaldependencies
chore: upgrade aws local dependencies
2 parents 0d99c8c + c947fe4 commit a092651

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

local/docker-compose.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
version: "3"
21
services:
32
dynamodb:
4-
image: amazon/dynamodb-local:2.0.0
3+
image: amazon/dynamodb-local:2.6.1
54
container_name: app-dynamodb
65
hostname: app-dynamodb
76
volumes:
@@ -11,12 +10,18 @@ services:
1110
- "8000:8000"
1211
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ."
1312
restart: unless-stopped
13+
networks:
14+
- db-network
1415

1516
dynamodb_migrator:
16-
image: amazon/aws-cli:2.13.6
17+
image: amazon/aws-cli:2.31.28
1718
container_name: app-dynamodb_migrator
1819
working_dir: /home/dynamodblocal
19-
command: dynamodb create-table --cli-input-json file://paste.json --endpoint-url http://dynamodb:8000
20+
entrypoint: ["/bin/sh", "-c"]
21+
command:
22+
- |
23+
sleep 5
24+
aws dynamodb create-table --cli-input-json file://paste.json --endpoint-url http://app-dynamodb:8000
2025
volumes:
2126
- ./schema:/home/dynamodblocal
2227
environment:
@@ -25,7 +30,15 @@ services:
2530
- AWS_DEFAULT_REGION=local
2631
depends_on:
2732
- dynamodb
33+
restart: on-failure
34+
networks:
35+
- db-network
2836

2937
volumes:
3038
app_dynamodb:
3139
driver: local
40+
41+
networks:
42+
db-network:
43+
driver: bridge
44+

local/events/get.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"queryStringParameters": {
3-
"id": "f679e04f75bb74285359000765ea2af86adb198a"
3+
"id": "10a04c0b8c91a4bd996efa6b22beda1aab08f210"
44
},
55
"httpMethod": "GET",
66
"path": "/",

local/events/post.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"content": "examplary job",
2+
"content": "focuse on efficiency",
33
"httpMethod": "POST",
44
"path": "/",
55
"requestContext": {

terraform/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ terraform {
22
required_providers {
33
aws = {
44
source = "hashicorp/aws"
5-
version = "5.98.0"
5+
version = "5.92.0"
66
}
77
random = {
88
source = "hashicorp/random"
9-
version = "3.7.2"
9+
version = "3.7.1"
1010
}
1111
archive = {
1212
source = "hashicorp/archive"
13-
version = "2.7.1"
13+
version = "2.7.0"
1414
}
1515
local = {
1616
source = "hashicorp/local"

0 commit comments

Comments
 (0)