Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.
/ cdk-util Public archive

AWS CDK utility functions to Deploy, Describe and Destroy cloud apps

License

Notifications You must be signed in to change notification settings

dmitrii-t/cdk-util

Repository files navigation

🍭 Neat'n'sweet AWS CDK utility functions to Deploy, Describe and Destroy cloud stacks

Install the project locally

git clone https://github.com/dmitrii-t/aws-cdk-construct-topic-queue.git
npm install

Build the construct and echo handler

npm run build

Create local .env file with AWS credentials for your deployment account

cat > .env <<EOF
AWS_ACCESS_KEY_ID="<provide your access key id>"
AWS_SECRET_ACCESS_KEY="<privide your scret key>"
AWS_DEFAULT_REGION="<specify default region to deploy>"
EOF

Test utility functions

npm test

Create your stack

class CdkUtilTest extends Stack {
    constructor(scope: App, id: string = CdkUtilTest.name) {
      super(scope, id);

      const topic = new sns.Topic(this, 'Topic');

      // Outputs
      new CfnOutput(this, 'TopicArn', {value: topic.topicArn});
    }
  }

  const id = 'CdkUtilTest';
  const app = new App({outdir: CdkOut});
  const stack = new CdkUtilTest(app, id);

Deploy your stack with deployStack function

await deployStack({name: id, app, exclusively: true});

To decommission you stack run destroyStack

await destroyStack({name: id, app, exclusively: true});

About

AWS CDK utility functions to Deploy, Describe and Destroy cloud apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published