Skip to content

This is a workspace template for general AWS CDK development in Gitpod.

Notifications You must be signed in to change notification settings

kenkutok/aws-cdk-my-gitpod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-cdk-my-gitpod

This is a workspace template for general AWS CDK development in Gitpod.

Click this button below to open a fresh new CDK development workspace in Gitpod

Open in Gitpod

Create AWS CDK App

npx projen new awscdk-app-ts

Create AWS CDK Construct Lib

npx projen new awscdk-construct

Configure AWS CLI V2 with AWS SSO

aws configure sso

The following example generate the SSO profile with default as the profile name:

$ aws configure sso --profile default
SSO start URL [None]: https://kenkutok.awsapps.com/start                                                                                                                              
SSO Region [None]: ap-northeast-1                                                                                                                                                            
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:

https://device.sso.us-east-1.amazonaws.com/

Then enter the code:

DJHN-QKRK
The only AWS account available to you is: 123456789012
Using the account ID 123456789012
The only role available to you is: AdministratorAccess
Using the role name "AdministratorAccess"
CLI default client Region [None]: ap-northeast-1                                                                     
CLI default output format [None]:                                                                                    

To use this profile, specify the profile name using --profile, as shown:

aws s3 ls --profile default        

Request temporary credentials and update ~/.aws/credentials

$ bash utils/refresh_credentials.sh 
=> requesting temporary credentials
=> updating ~/.aws/credentials as profile default
[OK] done

Check identity:

$ aws sts get-caller-identity 

If you have different SSO profile name, run it with AWS_PROFILE:

$ AWS_PROFILE=<OTHER_PROFILE_NAME> bash utils/refresh_credentials.sh 

Start your CDK development

You should be able to run the CDK CLI now.

$ cdk diff
$ cdk deploy
$ cdk destroy

About

This is a workspace template for general AWS CDK development in Gitpod.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published