0.2.0 • Published 4 years ago
@guardian/cdk-ts-starter v0.2.0
cdk-ts-starter
Want to use CDK but without lots of files?
yarn init // answer the questions
yarn add @guardian/cdk-ts-starter
touch cdk.ts // then edit to add some stuff
yarn gen-cdk
cat cfn.yaml // see the results
A hello-world cdk.ts
file might look like:
import * as core from '@aws-cdk/core';
import * as s3 from '@aws-cdk/aws-s3';
import * as cdk from '@aws-cdk/core';
export class HelloCdkStack extends core.Stack {
constructor(scope: core.App, id: string, props?: core.StackProps) {
super(scope, id, props);
new s3.Bucket(this, 'MyFirstBucket', {
versioned: true,
});
}
}
See https://docs.aws.amazon.com/cdk/latest/guide/hello_world.html for more info.