1.2.0 Postgres and DynamoDB

0. Learning Materials

Task List


1. Workflow

1.1 Build containers

Add the following docker container configurations for:

  • dynamodb-local

  • db (postgresql)

Then run docker-compose.

  • docker compose -f 'docker-compose.yml' up -d --build

docker compose busy pulling and building our containers.

1.2 Test the database

In case you don't have aws-cli or postgres installed in your local machine, see discussion.

Now that the DynamoDB container is running locally, create a table.

Once the table is created, populate the db with some data.

Test the connection from our local machine to the locally running Postgres database.

This db testing extension is called "vscode-database-client2" by cweijan. You can see that the container is running and the port is open (5432)

You can also connect to the postgres db with the command line:

  • psql -Upostgres --host localhost

The connection was successful.

2. Discussion

2.1 Install DynamoDB and PostgreSQL

  • DynamoDB

  • PostgreSQL

Last updated