This is a blank project for TypeScript development with CDK.
The cdk.json file tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template
Run:
cdk bootstrap
# or
cdk deploy
and the following error will be thrown
Error: Resource used in GetAtt expression with logical ID: 'UserTable' not found
The Cloudformation stacks generated by running npm run transform could be found under /lib/build. And inside the stack User, there is a User DynamoDB table which is defined like this:
"UserTableBD4BF69E": {
"Type": "AWS::DynamoDB::Table",
...
but then, the Outputs are referencing the resource like this by UserTable (but there is no such resource inside the Cloudformation template):
"GetAttUserTableStreamArn": {
"Description": "Your DynamoDB table StreamArn.",
"Value": {
"Fn::GetAtt": [
"UserTable",
"StreamArn"
]
},
"Export": {
"Name": {
"Fn::Join": [
":",
[
{
"Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId"
},
"GetAtt:UserTable:StreamArn"
]
]
}
}
},