0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS CDK コマンドチートシート

Posted at

インストール

npm install -g aws-cdk

Linuxの場合は、sudoが必要です。

プロジェクトの作成

mkdir my-first-cdk
cdk init app --language typescript

モジュールの追加

たとえばec2のモジュールを追加するには、

npm install @aws-cdk/aws-ec2

or

yarn add @aws-cdk/aws-ec2

こんなかんじ。

bootstrap

CDKを実行するために必要なAWS内の環境を初期化。

AWS_PROFILE=your_profile cdk boostrap

ビルド

npm run build

deploy

AWS_PROFILE=your_profile cdk deploy

変更差分の確認

AWS_PROFILE=your_profile cdk diff

変更適用

AWS_PROFILE=your_profile cdk deploy
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?