In this tutorial, you will learn:
- How to install AWS CDK
You are going to need:
- Make sure you have Node.js setup
- Make sure your aws credentials are properly configured.
Here's an example of my AWS configured access files where I have my own personal aws account as the
default profile and two other aws accounts for my work company -- acme-corp👨🏿💻.
# Linux and MacOS: ~/.aws/credentials # Windows: %USERPROFILE%\.aws\credentials [default] aws_access_key_id=xXXxxxxXXXXxxxxxxx aws_secret_access_key=xxXXXXxxxXXxXxx [acme-corp-prod-acc] aws_access_key_id=xXXxxxxXXXXxxxxxxx aws_secret_access_key=xxXXXXxxxXXxXxx [acme-corp-dev-acc] aws_access_key_id=xXXxxxxXXXXxxxxxxx aws_secret_access_key=xxXXXXxxxXXxXxx
# Linux and MacOS: ~/.aws/config # Windows: %USERPROFILE%\.aws\config [default] region=us-west-2 output=json [profile acme-corp-prod-acc] region=us-west-2 output=json [profile acme-corp-dev-acc] region=us-west-2 output=json
- The AWS CDK will look for these files when it needs access to whatever AWS accounts it needs to deploy resources to.
- It helps that the IAM credentials used have administrator privileges when deploying resources as this will reduce a lot of headache regarding permissions.
- You can filter out permissions and privileges if you have a good understanding of AWS IAM and the permission needs of your deployments.
Install the AWS CDK globally (so that you can bootstrap a new CDK project in your language choice) in any folder
npm install -g aws-cdk
Check that its installed
In the next part, we will set up a project with the cdk and deploy it!
Hi I'm Emmanuel! I write about Software and DevOps.