[英]Getting started with aws cdk - "empty" output of `cdk synth` command
I'm trying to follow the official tutorial: https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html我正在尝试按照官方教程进行操作: https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html
I picked Java but tried Typescript too with the same result: the S3 bucket resource template isn't produced and the deploy doesn't create the bucket.我选择了 Java,但也尝试了 Typescript,结果相同:未生成 S3 存储桶资源模板,并且部署未创建存储桶。
The code is here: https://github.com/jumarko/aws-experiments/tree/master/cdk/hello-cdk-java代码在这里: https://github.com/jumarko/aws-experiments/tree/master/cdk/hello-cdk-java
The cdk synth
command produces only this CDKMetadata
and nothing else: cdk synth
命令只产生这个CDKMetadata
而没有别的:
cd hello-cdk-java
cdk init app --language java
mvn compile
cdk ls
# modify the stack java code
...
# this for some reason only outputs Metadata for me
# even `mvn clean package` doesn't help
cdk synth
Resources:
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Modules: aws-cdk=1.61.1,@aws-cdk/cloud-assembly-schema=1.61.1,@aws-cdk/core=1.61.1,@aws-cdk/cx-api=1.61.1,jsii-runtime=Java/14.0.1
Condition: CDKMetadataAvailable
Conditions:
CDKMetadataAvailable:
Fn::Or:
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- ap-east-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-2
- Fn::Equals:
- Ref: AWS::Region
- ap-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-2
- Fn::Equals:
- Ref: AWS::Region
- ca-central-1
- Fn::Equals:
- Ref: AWS::Region
- cn-north-1
- Fn::Equals:
- Ref: AWS::Region
- cn-northwest-1
- Fn::Equals:
- Ref: AWS::Region
- eu-central-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- eu-north-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-2
- Fn::Equals:
- Ref: AWS::Region
- eu-west-3
- Fn::Equals:
- Ref: AWS::Region
- me-south-1
- Fn::Equals:
- Ref: AWS::Region
- sa-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-2
- Fn::Equals:
- Ref: AWS::Region
- us-west-1
- Fn::Equals:
- Ref: AWS::Region
- us-west-2
Any clue on what's going on or how to debug the issue?关于发生了什么或如何调试问题的任何线索?
I'm using Mac OS X 10.15.6 with the following CLI versions:我正在使用具有以下 CLI 版本的 Mac OS X 10.15.6:
$ aws --version
aws-cli/2.0.10 Python/3.8.2 Darwin/19.6.0 botocore/2.0.0dev14
$ cdk --version
1.61.1 (build 347918f)
I generated a new project from the template and it suddenly started to work.我从模板生成了一个新项目,它突然开始工作了。 I'm not sure what changed - I also experimented with using different --profile
but at first that didn't work either.我不确定发生了什么变化 - 我也尝试使用不同--profile
但起初也没有用。
The issue is solved now - if something goes wrong it's worth starting from scratch again!现在问题已解决 - 如果出现问题,值得从头开始!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.