How To Install AWS Cloud Development Kit

  1. Installation
    # Install AWS CLI on CentOs >= 7
    sudo dnf install awscli
    
    # Create Default Profile to login with AWS CLI Tools
    aws configure
    
    # Install CDK and Required Tools
    npm install -g aws-cdk
    npm install -g ts-node
    npm install -g esbuild
    npm install -g jest
    
    # Install yarn if you prefer it than npm
    npm install -g yarn
  2. Create a Project
    # On a New AWS Account you must to Add CDK Bootstrap packages. this is how it's done
    cdk bootstrap --profile default
    
    # Create CDK Application
    cdk init app --language=typescript
    
    ######
    # OR #
    ######
    
    # In Vagrant machine on Windows Hosts
    cdk init app --language=typescript --generate-only
    yarn install --no-bin-links
  3. Apply Project
    cdk synth
    
    # Use '--profile default' Option With All cdk commands to can login with previous created profile
    cdk deploy --profile default
  4. Destroy Project
    # Use '--profile default' Option With All cdk commands to can login with previous created profile
    cdk destroy --profile default
  5. Debugging
    # Sometimes you need to debug the custom init script that you provide to create of EC2 Instance 
    aws ec2 get-console-output --instance-id i-09edc092e25b1500b --profile default

0 ( 0 ) Comments