0
0

AWS CLIの設定

Posted at

公式ドキュメントとか見たら、書いてありますが・・・


aws cli のインストール

terminal
brew install awscli
//確認
aws --version

aws cliの認証情報とアクセスキーを紐付ける

まずAWSのI AMのユーザーのページかセキュリティ認証情報ページでアクセスキーを作成しておきます。

terminal
aws configure
AWS Access Key ID [None]: アクセスキー ID
AWS Secret Access Key [None]: シークレットアクセスキー
Default region name [None]: ap-northeast-1
Default output format [None]: ap-northeast-1

//確認
aws configure list

aws cdk のインストール

terminal
brew install aws-cdk
または npm install -g aws-cdk
//確認
cdk --version

ブートストラップする

terminal
// AWS アカウント番号を調べる
aws sts get-caller-identity
// デフォルトの地域を調べる
aws configure get region

cdk bootstrap aws://ACCOUNT-NUMBER/REGION

CDKでプロジェクト作成

mkdir cdk-demo
cd cdk-demo
cdk init --language typescript

bin/cdk-demo.ts を変更して、AWSサービスを定義する。

デプロイ

cdk deploy

これでAWSにサービスが作成されているはず。


参考

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