aws-samples / aws-samples/sample-agentic-platform

fix(labs/module5): DynamoDB table config keys missing from SSM parameter store

Open
#78 0 comments 0 reactions 1 assignee Claimed by @tannermcrae View on GitHub
Dominant language
Python
Stars
133
Forks
54
PR merge metrics
No merged PRs in 30d

Description

## Problem

The notebook `labs/module5/notebooks/2_llm_gateway.ipynb` (cell 4) expects the following keys in the SSM parameter `/agentic-platform/config/agentcore-dev`:

- `DYNAMODB_USAGE_LOGS_TABLE`
- `DYNAMODB_USAGE_PLANS_TABLE`
- `REDIS_HOST`
- `REDIS_PORT`
- `REDIS_PASSWORD_SECRET_ARN`

However, the Terraform `platform-agentcore` stack does not include DynamoDB table provisioning or their names in the `configuration_sections` passed to the parameter store module.

## Error

```python
KeyError: 'DYNAMODB_USAGE_LOGS_TABLE'
```

## Root Cause

The DynamoDB tables for the LLM gateway usage plans/logs are not provisioned by Terraform. They appear to be created at application deployment time (`deploy/deploy-application.sh llm-gateway --build`), but their table names are never written back to the SSM parameter store config.

The notebook assumes all config is available in SSM after the infrastructure stack is deployed, but the DynamoDB resources are a gap between infrastructure and application deployment.

## Affected Files

- `labs/module5/notebooks/2_llm_gateway.ipynb` (cell 4) — expects `DYNAMODB_USAGE_LOGS_TABLE` and `DYNAMODB_USAGE_PLANS_TABLE`
- `infrastructure/stacks/platform-agentcore/main.tf` — `configuration_sections` does not include DynamoDB table names

## Expected Fix

Either:
1. Add DynamoDB table provisioning to the Terraform stack and include table names in `configuration_sections`
2. Or add a prerequisite note in the notebook stating the LLM gateway must be deployed first (`deploy/deploy-application.sh llm-gateway --build`) before this cell will work
3. Or wrap the config lookups in a try/except with a helpful error message pointing to the deployment step

## Related

- #76 — SSM parameter name mismatch (fixed in #77)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.