Skip to content

Cart Service (carts-db) doesn’t auto-create DynamoDB table using docker-compose or Kubernetes manifests #941

@stacksimplify

Description

@stacksimplify

Cart Service (carts-db) doesn’t auto-create DynamoDB table in docker-compose or Kubernetes manifests

Issue Description

When running the Cart service with the provided docker-compose.yaml or kubernetes.yaml manifests from this repo, the associated DynamoDB Local container (carts-db) starts successfully, but the required Items table is not created automatically.

The Cart service logs confirm it expects the Items table, but reports it as missing:

cart-1  | 2025-09-20T10:55:04.645Z  INFO 1 --- [           main] c.a.s.c.c.DynamoDBConfiguration          : DynamoDB table: Items
cart-1  | 2025-09-20T10:55:04.721Z  INFO 1 --- [           main] c.a.s.c.c.DynamoDBConfiguration          : DynamoDB endpoint: http://carts-db:8000
cart-1  | 2025-09-20T10:55:10.411Z  WARN 1 --- [           main] c.a.s.c.s.DynamoDBCartService            : Dynamo table not found

Expected Behavior

The Cart service should either:

  1. Auto-create the Items table (when RETAIL_CART_PERSISTENCE_DYNAMODB_CREATE_TABLE=true is set), or
  2. Provide clear instructions in the documentation to manually create the Items table before starting the service.

Actual Behavior

  • carts-db container starts successfully.
  • Cart service connects to DynamoDB Local but the Items table does not exist, causing warnings and failed persistence.

Steps to Reproduce

  1. Clone the repo and run docker compose up (or apply the provided Kubernetes manifests).
  2. Wait for cart and carts-db to become healthy.
  3. Check Cart service logs:
docker compose up -d
docker compose logs -f cart

You will see:

cart-1  | 2025-09-20T10:55:10.411Z  WARN 1 --- [           main] c.a.s.c.s.DynamoDBCartService            : Dynamo table not found

Suggestion

  • Ensure the Items table is created automatically at startup when using the default manifests, or
  • Update documentation with explicit instructions on creating the table manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions