Step 1: Create a schema in the portal
In the portal, navigate to Schemas and click Create schema. Fill in the following fields:| Field | Description |
|---|---|
| Schema name | Logical name used in SQL (schema.table). Cannot be changed after creation. |
| Region | AWS region where your DynamoDB tables live (e.g., us-east-1). |
| Account ID | Your 12-digit AWS account number. |
| Role name | The IAM role name you will create in Step 2 (e.g., DynamoSqlReadRole). |
| External ID | Auto-generated. Used in the trust policy to prevent confused-deputy attacks. You can regenerate it, but do so before creating the IAM role. |
| Table allowlist | Table names DynamoSQL is allowed to query, one per line — or check Allow all tables (*) for wildcard access. |
Step 2: Copy the generated IAM policies
Expand Role setup instructions (AWS Console + CLI) on the schema creation form. The portal generates two ready-to-use JSON documents based on your inputs: Trust policy — allows DynamoSQL’s data plane to assume the role, scoped to your ExternalId:When Allow all tables (*) is enabled, the portal adds a
dynamodb:ListTables statement on Resource: "*" so DynamoSQL can enumerate your tables.Step 3: Create the IAM role in AWS
The portal also shows a ready-to-run AWS CLI script. The fastest path is to copy it, save the two JSON files (trust-policy.json and dsql-read-policy.json), then run:
- IAM → Roles → Create role
- Choose Custom trust policy and paste the trust policy JSON from the portal
- Name the role exactly as entered in the schema form
- Add an inline policy and paste the DynamoDB read policy JSON
- Save the role
Step 4: Save the schema and validate
Back in the portal, click Create schema. The portal saves the schema configuration and redirects you to the schema detail page, where it automatically attempts to assume the role and validate access. If validation passes, the schema status shows Active and you’re ready to query. If it fails, the portal shows a Failed — Please Review status. Common causes:- Role name or account ID typo (the derived ARN won’t match the role you created)
- Trust policy principal ARN does not match DynamoSQL’s data plane ARN exactly
- ExternalId in the trust policy doesn’t match the one generated by the portal
- IAM propagation delay — wait 10–15 seconds and re-validate from the schema detail page