You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dynamodb-mcp-server/README.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The DynamoDB MCP server provides four tools for data modeling and validation:
14
14
15
15
**Example invocation:** "Validate my DynamoDB data model"
16
16
17
-
-`source_db_analyzer` - Analyzes existing MySQL/Aurora databases to extract schema structure, access patterns from Performance Schema, and generates timestamped analysis files for use with dynamodb_data_modeling. Requires AWS RDS Data API and credentials in Secrets Manager.
17
+
-`source_db_analyzer` - Analyzes existing MySQL/Aurora databases to extract schema structure, access patterns from Performance Schema, and generates timestamped analysis files for use with dynamodb_data_modeling. Supports both AWS RDS Data API (Aurora MySQL) and direct connections (RDS/self-hosted MySQL).
18
18
19
19
**Example invocation:** "Analyze my MySQL database and help me design a DynamoDB data model"
20
20
@@ -159,11 +159,24 @@ The tool automates the traditional manual validation process:
159
159
160
160
The `source_db_analyzer` tool analyzes existing MySQL/Aurora databases to extract schema and access patterns for DynamoDB modeling. This is useful when migrating from relational databases.
161
161
162
+
The tool supports two connection methods:
163
+
-**AWS RDS Data API** (Aurora MySQL): Serverless connection using cluster ARN
164
+
-**Direct Connection** (RDS/self-hosted MySQL): Traditional connection using hostname/port
165
+
162
166
#### Prerequisites for MySQL Integration
163
167
168
+
**For AWS RDS Data API (Aurora MySQL):**
164
169
1. Aurora MySQL Cluster with credentials stored in AWS Secrets Manager
165
170
2. Enable RDS Data API for your Aurora MySQL Cluster
166
-
3. Enable Performance Schema for access pattern analysis (optional but recommended):
171
+
3. AWS credentials with permissions to access RDS Data API and AWS Secrets Manager
172
+
173
+
**For Direct Connection (RDS/self-hosted MySQL):**
174
+
1. MySQL server (RDS, Aurora, or self-hosted) accessible from your environment
175
+
2. Database credentials stored in AWS Secrets Manager
176
+
3. AWS credentials with permissions to access AWS Secrets Manager
177
+
178
+
**For both connection methods:**
179
+
4. Enable Performance Schema for access pattern analysis (optional but recommended):
167
180
- Set `performance_schema` parameter to 1 in your DB parameter group
168
181
- Reboot the DB instance after changes
169
182
- Verify with: `SHOW GLOBAL VARIABLES LIKE '%performance_schema'`
@@ -172,18 +185,28 @@ The `source_db_analyzer` tool analyzes existing MySQL/Aurora databases to extrac
172
185
-`performance_schema_max_digest_length` - Maximum byte length per statement digest (default: 1024)
173
186
- Without Performance Schema, analysis is based on information schema only
174
187
175
-
4. AWS credentials with permissions to access RDS Data API and AWS Secrets Manager
176
-
177
188
#### MySQL Environment Variables
178
189
179
190
Add these environment variables to enable MySQL integration:
180
191
192
+
**For AWS RDS Data API (Aurora MySQL):**
181
193
-`MYSQL_CLUSTER_ARN`: Aurora MySQL cluster Resource ARN
182
194
-`MYSQL_SECRET_ARN`: ARN of secret containing database credentials
183
195
-`MYSQL_DATABASE`: Database name to analyze
184
196
-`AWS_REGION`: AWS region of the Aurora MySQL cluster
197
+
198
+
**For Direct Connection (RDS/self-hosted MySQL):**
199
+
-`MYSQL_HOSTNAME`: MySQL server hostname or endpoint
200
+
-`MYSQL_PORT`: MySQL server port (optional, default: 3306)
201
+
-`MYSQL_SECRET_ARN`: ARN of secret containing database credentials
202
+
-`MYSQL_DATABASE`: Database name to analyze
203
+
-`AWS_REGION`: AWS region where Secrets Manager is located
204
+
205
+
**Common options:**
185
206
-`MYSQL_MAX_QUERY_RESULTS`: Maximum rows in analysis output files (optional, default: 500)
186
207
208
+
**Note:** Explicit tool parameters take precedence over environment variables. Only one connection method (cluster ARN or hostname) should be specified.
assert'To analyze your mysql database, I need:'inresult
93
+
assert (
94
+
'Missing required parameters: Required: Either aws_cluster_arn (Aurora MySQL cluster ARN for RDS Data API) OR hostname (MySQL server hostname for direct connection)'
0 commit comments