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 build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits 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"
]
]
}
}
},