-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Currently only a harcoded string is allowed as table name in Models definitons.
Add an option to source the table name from AWS Systems Manager (SSM) Parameter Store.
Instead of the table name, we pass a SSM ARN and the value is swapped on run-time.
Thus it would be possible to update the table name without redeployment (useful after a backup, for example).
export class MyModel extends Model<unknown> {
tableName = 'arn:aws:ssm:<aws-region>:<aws-account-id>:database-name-prod';
}The behavior to implement is the following:
- Check if table name is a SSM ARN (using a regexp)
- If not, use provided string as it
- If it is a SSM parameter ARN, fetch its value at first request and cache this result for subsequent requests
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers