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 5 years have passed since last update.

[社内勉強会] プログラミングでインフラ定義

Last updated at Posted at 2020-04-22

今回話すこと

プログラミングにインフラを作成する
AWSのCDK(Cloud Developer Kit)の入門について話す

ざっくりCDKとは

AWSでインフラ定義するものとして、CloudFormationやTerraformといった手法がある。
記述に癖があるものが多い中、プログラミングで記載できるのがCDKの特徴。

CDKに対応しているプログラム言語は、
JavaScript、TypeScript、Python、 Java、およびC#に対応している

記載例) SQSとSNSを立ち上げるコード。TypeScriptで出来ている。

export class HelloCdkStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const queue = new sqs.Queue(this, 'HelloCdkQueue', {
      visibilityTimeout: cdk.Duration.seconds(300)
    });

    const topic = new sns.Topic(this, 'HelloCdkTopic');
    topic.addSubscription(new subs.SqsSubscription(queue));
  }
} 

ただし、実態はCloudFormation
プログラミングをCloudFormationに変換して実行してくれるもよう

ハンズオン

こちらのワークショップで進めいていく。

実際につくるのは、プログラミングからLamdbaとAPIGateWayでHelloWorldを作成する。

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?