AWS CDK Workshop

AWS CDK 맛보기!!

Before getting started

Workshop을 μ‹œμž‘ν•˜κΈ° 전에 AWS CDKκ°€ λ­”μ§€ κ°„λ‹¨νžˆ μ•Œμ•„λ΄…μ‹œλ‹Ή

AWS CDKλž€?

  • AWS CDK (Cloud Development Kit)λŠ” ν˜„λŒ€μ  ν”„λ‘œκ·Έλž˜λ° μ–Έμ–΄λ₯Ό μ‚¬μš©ν•˜μ—¬ Cloud Infraλ₯Ό code둜 μ •μ˜ν•˜κ³ , AWS CloudFormation 을 톡해 λ°°ν¬ν•˜λŠ” opensource software 개발 ν”„λ ˆμž„μ›Œν¬

AWS CDK CLI둜 무엇을 ν•  수 μžˆμ„κΉŒ?

: AWS CDK CLIλ₯Ό μ‚¬μš©ν•˜μ—¬ CDK applicationκ³Ό μƒν˜Έ μž‘μš©ν•  수 μžˆλ‹€

  • CDK CLIλ₯Ό μ‚¬μš©ν•˜λ©΄

    • CDK 앱에 μ •μ˜λœ stack을 λ‚˜μ—΄ν•˜κ³ ,

    • Stack을 CloudFormation ν…œν”Œλ¦Ώμ— ν•©μ„±ν•˜κ³ ,

    • 싀행쀑인 stack instance와 CDK code에 μ •μ˜λœ stack κ°„μ˜ CDK code 에 μ •μ˜λœ stack κ°„μ˜ 차이점을 ν™•μΈν•˜κ³ ,

    • μ›ν•˜λŠ” Public AWS Region 에 stack을 배포 ν•  수 μžˆλ‹€

AWS CDKλŠ” μ–΄λ–»κ²Œ μž‘λ™ν• κΉŒ?

  • AWS CDK ν”„λ ˆμž„μ›Œν¬λ₯Ό μ‚¬μš©ν•˜μ—¬ AWS CDK ν”„λ‘œμ νŠΈλ₯Ό μž‘μ„±ν•  수 있으며, 이 ν”„λ‘œμ νŠΈκ°€ μ‹€ν–‰λ˜μ–΄ CloudFormation ν…œν”Œλ¦Ώμ„ μƒμ„±ν•˜κ²Œ λœλ‹€.

  • AWS CDK ν”„λ‘œμ νŠΈλŠ” AWS CDK CLI λ‚˜ CD systemμ—μ„œ 싀행될 수 μžˆλ‹€

0. Install AWS CDK

npm i -g aws-cdk

1. CDK INIT

CDK INIT

cdk init sample-app --language typescript
  • Typescriptλ₯Ό μ‚¬μš©ν•˜λŠ” CDK ν”„λ‘œμ νŠΈ μƒμ„±ν•˜κΈ°

μ‹€ν–‰ κ²°κ³Ό

chloe@chloe-XPS-15-9570 ~/Workspace/aws-test/cdk-workshop
$ cdk init sample-app --language typescript
Applying project template sample-app for typescript
# Welcome to your CDK TypeScript project!

You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (`CdkWorkshopStack`)
which contains an Amazon SQS queue that is subscribed to an Amazon SNS topic.

The `cdk.json` file tells the CDK Toolkit how to execute your app.

## Useful commands

 * `npm run build`   compile typescript to js
 * `npm run watch`   watch for changes and compile
 * `npm run test`    perform the jest unit tests
 * `cdk deploy`      deploy this stack to your default AWS account/region
 * `cdk diff`        compare deployed stack with current state
 * `cdk synth`       emits the synthesized CloudFormation template

Initializing a new git repository...
Executing npm install...
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.1.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN cdk-workshop@0.1.0 No repository field.
npm WARN cdk-workshop@0.1.0 No license field.

βœ… All done!
  • μ°Έκ³ ν•˜λ©΄ 쒋은 λͺ…령어듀이 좜λ ₯됨

Useful commands

  • npm run build compile typescript to js

  • npm run watch watch for changes and compile

  • npm run test perform the jest unit tests

  • cdk deploy deploy this stack to your default AWS account/region

  • cdk diff compare deployed stack with current state

  • cdk synth emits the synthesized CloudFormation template

2. npm run watch

TypesScript μ½”λ“œ 컴파일링

  • TypeScript μ½”λ“œλŠ” JavaScript둜 compile λ˜μ–΄μ•Ό ν•˜κΈ° λ•Œλ¬Έμ— μ†ŒμŠ€ μ½”λ“œ λ³€κ²½ 뢄을 ν™•μΈν•˜λ €λ©΄ κ³„μ†ν•΄μ„œ .js 파일둜 complile을 ν•΄μ£Όμ–΄μ•Ό ν•œλ‹€

    • ν”„λ‘œμ νŠΈμ—λŠ” watch λΌλŠ” μ΄λ¦„μ˜ npm scriptκ°€ 이미 μ„€μ •λ˜μ–΄ μžˆμ–΄μ„œ, 이λ₯Ό μ‹€ν–‰ν•˜λ©΄ 맀번 μˆ˜λ™μœΌλ‘œ complie 해쀄 ν•„μš” 없이 μžλ™μœΌλ‘œ 변경뢄을 .js 파일둜 complie ν•΄μ€€λ‹€!

μ½”λ“œ λ³€κ²½λΆ„ watch ν•˜κΈ°

ν”„λ‘œμ νŠΈ Directory 둜 이동

chloe@chloe-XPS-15-9570 ~
$ cd Workspace/aws-test/cdk-workshop/

watch script μˆ˜ν–‰

npm run watch
  • 그러면 터미널 창의 λ‚΄μš©μ΄ μ§€μ›Œμ§€κ³  λ‹€μŒκ³Ό 같은 κ²°κ³Όκ°€ 좜λ ₯λœλ‹€

    image-20200903225530137
  • 이 scriptλŠ” TypeScript Compiler (tsc) λ₯Ό watch λͺ¨λ“œλ‘œ μ‹œμž‘ν•΄μ„œ, ν”„λ‘œμ νŠΈ 디렉토리λ₯Ό monitoring ν•˜μ—¬ .ts 파일의 변경뢄을 .js 파일둜 μžλ™ complie ν•΄μ€€λ‹€!

    • λ„˜λ‚˜ μ‹ κΈ°

3. ν”„λ‘œμ νŠΈ ꡬ쑰

Project Directory 탐색

image-20200905031542724
  • lib/cdk-workshop-stack.ts

    • CDK application의 main stack이 μ €μž₯λ˜λŠ” κ³³

  • bin/cdk-workshop.ts

    • CDK application의 entry point

    • lib/cdk-workshop-stack.ts 에 μ •μ˜λœ stack을 load ν•œλ‹€

  • cdk.json

    • toolkit이 μ–΄λ–»κ²Œ app을 μ‹€ν–‰ν•΄μ•Ό ν•˜λŠ”μ§€ μ•Œλ €μ£ΌλŠ” 파일

      • 이 ν”„λ‘œμ νŠΈμ˜ 경우 "npx ts-node bin/cdk-workshop.ts" κ°€ λ“€μ–΄κ°„λ‹€!

Entry Point

Entry point인 bin/cdk-workshop.ts 파일 μ‚΄νŽ΄λ³΄κΈ°

#!/usr/bin/env node
import * as cdk from '@aws-cdk/core';
import { CdkWorkshopStack } from '../lib/cdk-workshop-stack';

const app = new cdk.App();
new CdkWorkshopStack(app, 'CdkWorkshopStack');
  • 이 μ½”λ“œλŠ” CdkWorkshopStack 을 loadν•˜κ³  initiate ν•œλ‹€

    • μ–΄λ–€ stack을 loadν•  κ²ƒμΈμ§€λ§Œ μ •μ˜λ˜κ³  λ‚˜λ©΄ 더 이상 λ³Ό 일이 μ—†λŠ” 파일

Main Stack

μ€‘μš”ν•œ 뢀뢄이 μ •μ˜λ˜λŠ” lib/cdk-workshop-stack.ts 파일 μ‚΄νŽ΄λ³΄κΈ°

import * as cdk from '@aws-cdk/core';
import * as sns from '@aws-cdk/aws-sns';
import * as sqs from '@aws-cdk/aws-sqs';
import * as subs from '@aws-cdk/aws-sns-subscriptions';

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

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

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

    topic.addSubscription(new subs.SqsSubscription(queue));
  }
}
  • Application이 sample CDK stack (CdkWorkshopStack) 으둜 이루어진 것 확인 κ°€λŠ₯

  • 이 stackμ—λŠ” μ•„λž˜μ˜ μ„Έ κ°€μ§€ μ„œλΉ„μŠ€ 생성이 ν¬ν•¨λœλ‹€

    1. SQS Queue

      • new sqs.Queue

    2. SNS Topoic

      • new sns.Topic

    3. SNS Topicμ—μ„œ λ°œμƒν•˜λŠ” λͺ¨λ“  messageλ₯Ό μˆ˜μ‹ ν•˜λ„λ‘ Queue μ„€μ •

      • topic.addSubscription

4. CDK Synth

CDK μ•±μ—μ„œ CloudFormation Template μ‚°μΆœν•˜κΈ°

  • AWS CDK 앱은 codeλ₯Ό μ΄μš©ν•΄μ„œ Infraλ₯Ό 효과적으둜 μ •μ˜ν•˜λ„λ‘ λ„μ™€μ£ΌλŠ” 도ꡬ이닀

  • CDK 앱이 μ‹€μ œλ‘œ 싀행될 λ•ŒλŠ” AWS CloudFormation template을 stackλ§ˆλ‹€ μƒμ„±ν•˜μ—¬ μ‹€μ œ 배포λ₯Ό ν•œλ‹€

  • CDK μ•±μ—μ„œ template을 μ‚°μΆœν•˜κΈ° μœ„ν•΄μ„œλŠ” cdk synth λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•  수 μžˆλ‹€

    • CDK CLIλŠ” cdk.json 파일이 μžˆλŠ” directoryμ—μ„œλ§Œ 싀행될 수 μžˆλŠ” 점 μœ μ˜ν•˜κΈ°!

Sample appμ—μ„œ μΆ”μΆœλœ template μ‚΄νŽ΄λ³΄κΈ°

chloe@chloe-XPS-15-9570 ~/Workspace/aws-test/cdk-workshop
$ cdk synth
**************************************************
*** Newer version of CDK is available [1.62.0] ***
*** Upgrade recommended                        ***
**************************************************
Resources:
  CdkWorkshopQueue50D9D426:
    Type: AWS::SQS::Queue
    Properties:
      VisibilityTimeout: 300
    Metadata:
      aws:cdk:path: CdkWorkshopStack/CdkWorkshopQueue/Resource
  CdkWorkshopQueuePolicyAF2494A5:
    Type: AWS::SQS::QueuePolicy
    Properties:
      PolicyDocument:
        Statement:
          - Action: sqs:SendMessage
            Condition:
              ArnEquals:
                aws:SourceArn:
                  Ref: CdkWorkshopTopicD368A42F
            Effect: Allow
            Principal:
              Service: sns.amazonaws.com
            Resource:
              Fn::GetAtt:
                - CdkWorkshopQueue50D9D426
                - Arn
        Version: "2012-10-17"
      Queues:
        - Ref: CdkWorkshopQueue50D9D426
    Metadata:
      aws:cdk:path: CdkWorkshopStack/CdkWorkshopQueue/Policy/Resource
  CdkWorkshopQueueCdkWorkshopStackCdkWorkshopTopicD7BE96438B5AD106:
    Type: AWS::SNS::Subscription
    Properties:
      Protocol: sqs
      TopicArn:
        Ref: CdkWorkshopTopicD368A42F
      Endpoint:
        Fn::GetAtt:
          - CdkWorkshopQueue50D9D426
          - Arn
    Metadata:
      aws:cdk:path: CdkWorkshopStack/CdkWorkshopQueue/CdkWorkshopStackCdkWorkshopTopicD7BE9643/Resource
  CdkWorkshopTopicD368A42F:
    Type: AWS::SNS::Topic
    Metadata:
      aws:cdk:path: CdkWorkshopStack/CdkWorkshopTopic/Resource
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Modules: aws-cdk=1.61.1,@aws-cdk/aws-cloudwatch=1.61.1,@aws-cdk/aws-iam=1.61.1,@aws-cdk/aws-kms=1.61.1,@aws-cdk/aws-sns=1.61.1,@aws-cdk/aws-sns-subscriptions=1.61.1,@aws-cdk/aws-sqs=1.61.1,@aws-cdk/cloud-assembly-schema=1.61.1,@aws-cdk/core=1.61.1,@aws-cdk/cx-api=1.61.1,@aws-cdk/region-info=1.61.1,jsii-runtime=node.js/v12.17.0
    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
  • cdk synth λͺ…λ Ήμ–΄λ₯Ό cdk.json 파일이 μžˆλŠ” directoryμ—μ„œ μ‹€ν–‰ν•˜λ©΄ μœ„μ™€ 같이 CloudFormation template이 좜λ ₯λœλ‹€

  • 이 template은 μ•„λž˜μ˜ 4κ°€μ§€ μžμ›μ„ μƒμ„±ν•œλ‹€

  1. AWS::SQS::Queue

    • SQS 큐

  2. AWS::SNS::Topic

    • SNS ν† ν”½

  3. AWS::SNS::Subscription

    • 큐와 ν† ν”½ μ‚¬μ΄μ˜ subscription μ •μ˜

  4. AWS::SQS::QueuePolicy

    • ν† ν”½μ—μ„œ 큐둜 λ©”μ‹œμ§€λ₯Ό 보낼 수 μžˆλŠ” IAM μ •μ±…

  • AWS::CDK::Metadata λŠ” CDK toolkit 에 μ˜ν•΄ λͺ¨λ“  stack에 μžλ™μœΌλ‘œ μƒμ„±λ˜λŠ” μžμ›μ΄λ‹€

    • CDK νŒ€μ΄ λ³΄μ•ˆ issue νŒŒμ•… 및 뢄석을 ν•˜λŠ”λ°μ— μ‚¬μš©λœλ‹€κ³  함!

5. CDK Deploy

ν™˜κ²½ Bootstrap

  • AWS CDK 앱을 ν™˜κ²½ (계쑍/region)에 λ°°ν¬ν•˜κΈ° μœ„ν•΄μ„œλŠ” λ¨Όμ € bootstrap stack 을 μ„€μΉ˜ν•΄μ•Ό ν•œλ‹€

    • bootstrap stackμ—λŠ” toolkit의 μš΄μ˜μ„ μœ„ν•΄ ν•„μš”ν•œ μžμ›λ“€μ΄ ν¬ν•¨λ˜μ–΄ μžˆλ‹€

      • ex) CFN teamplate을 λ³΄κ΄€ν•˜κ³ , 배포 process λ™μ•ˆ μƒμ„±λ˜λŠ” asset듀을 μ €μž₯ν•˜λŠ” S3 bucket

  • cdk bootstrap λͺ…λ Ήμ–΄λ₯Ό μ΄μš©ν•΄μ„œ ν•˜λ‚˜μ˜ ν™˜κ²½μ— λŒ€ν•œ bootstrap stack을 μ„€μΉ˜ν•  수 μžˆλ‹€

chloe@chloe-XPS-15-9570 ~/Workspace/aws-test/cdk-workshop
$ cdk bootstrap
 ⏳  Bootstrapping environment aws://213888382832/us-west-2...
CDKToolkit: creating CloudFormation changeset...
[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] (3/3)



 βœ…  Environment aws://213888382832/us-west-2 bootstrapped.
**************************************************
*** Newer version of CDK is available [1.62.0] ***
*** Upgrade recommended                        ***
**************************************************
  • λ§Œμ•½ μ—¬κΈ°μ—μ„œ Access Denied errorκ°€ λ°œμƒν•˜λ©΄,

    1. AWS CLI κ°€ μ œλŒ€λ‘œ μ„€μ •λ˜μ§€ μ•Šμ•˜κ±°λ‚˜

    2. μ‚¬μš©μ€‘μΈ AWS profile 이 cloudformation:CreateChangeSet μž‘μ—…μ„ μˆ˜ν–‰ν•  κΆŒν•œμ΄ μ—†λŠ” 것

  • μœ„μ˜ λͺ…λ Ήμ–΄κ°€ μ„±κ³΅μ •μœΌλ‘œ μˆ˜ν–‰λ˜κ³  λ‚˜λ©΄ CDK 앱을 배포할 수 μžˆλ‹€!

λ°°ν¬ν•˜κΈ°

  • cdk deploy λͺ…λ Ήμ–΄λ₯Ό μ΄μš©ν•΄μ„œ CDK 앱을 λ°°ν¬ν•œλ‹€

chloe@chloe-XPS-15-9570 ~/Workspace/aws-test/cdk-workshop
$ cdk deploy
This deployment will make potentially sensitive changes according to your current security approval level (--require-approval broadening).
Please confirm you intend to make the following modifications:

IAM Statement Changes
β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   β”‚ Resource                β”‚ Effect β”‚ Action          β”‚ Principal               β”‚ Condition               β”‚
β”œβ”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ + β”‚ ${CdkWorkshopQueue.Arn} β”‚ Allow  β”‚ sqs:SendMessage β”‚ Service:sns.amazonaws.c β”‚ "ArnEquals": {          β”‚
β”‚   β”‚                         β”‚        β”‚                 β”‚ om                      β”‚   "aws:SourceArn": "${C β”‚
β”‚   β”‚                         β”‚        β”‚                 β”‚                         β”‚ dkWorkshopTopic}"       β”‚
β”‚   β”‚                         β”‚        β”‚                 β”‚                         β”‚ }                       β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)

Do you wish to deploy these changes (y/n)?
  • μœ„μ™€ 같은 κ²½κ³ λŠ” λ°°ν¬ν•˜λ €λŠ” 앱에 λ³΄μ•ˆ 점검이 ν•„μš”ν•œ ν•­λͺ©μ΄ λ™λ°˜λ˜λŠ” 경우 좜λ ₯λœλ‹€

    • Topicμ—μ„œ Queue둜 messageλ₯Ό λ³΄λ‚΄μ€˜μ•Ό ν•˜λ―€λ‘œ yλ₯Ό μž…λ ₯ν•˜μ—¬ stack을 λ°°ν¬ν•˜κ³  μžμ›μ„ μƒμ„±ν•˜μž!

CdkWorkshopStack: deploying...
CdkWorkshopStack: creating CloudFormation changeset...
[β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ] (6/6)






 βœ…  CdkWorkshopStack

Stack ARN:
arn:aws:cloudformation:us-west-2:213888382832:stack/CdkWorkshopStack/fa564140-f078-11ea-b665-0a050e07f862
  • μ‹€ν–‰ κ²°κ³Ό μ„€λͺ…

    • us-west-2 λŠ” app을 μƒμ„±ν•œ region 이고,

    • 213888382832 λŠ” account ID이고,

    • fa564140-f078-11ea-b665-0a050e07f862 λŠ” stack ID 이닀

CloudFormation Console

  • CDK 앱은 AWS CloudFormation 을 톡해 λ°°ν¬λœλ‹€

  • CDK stack은 CloudFormation stackκ³Ό 1:1 둜 λ§€ν•‘λœλ‹€

    • 즉, Stack 을 κ΄€λ¦¬ν•˜κΈ° μœ„ν•΄ CloudFormation을 μ΄μš©ν•  수 μžˆλ‹€!

CloudFormation console

image-20200907050327196
  • CdkWorkshopStack 을 μ„ νƒν•˜κ³  λ¦¬μ†ŒμŠ€ 탭을 ν΄λ¦­ν•˜λ©΄, μƒμ„±ν•œ μžμ›μ˜ 물리적 IDλ₯Ό 확인할 수 μžˆλ‹€

물리적 ID ν™•μΈν•˜κΈ°

image-20200907050258865

Last updated

Was this helpful?