Created
August 13, 2020 09:32
-
-
Save dblencowe/e1cc7b3f90fbdee79150c13adb851d47 to your computer and use it in GitHub Desktop.
Load objects from Amplify for use in CDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {TableNames} from "../tables.json" | |
const applicationTables: {[id: string]: string} = {} | |
for (const DynamoTable of TableNames) { | |
applicationTables[DynamoTable.split('-')[0]] = DynamoTable | |
} | |
console.log(applicationTables.MyGraphqlTable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"build:env": "aws dynamodb list-tables > tables.json" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"TableNames": [ | |
"MyGraqhqlTable-lv3rfamxxxxxxxxxxxbiigvwi-env" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment