Create CDK project
Create CDK project
- Change the path to main repo and make a new CDK project using typescript
cd ~/environment/my-eks-blueprints
cdk init app --language typescript
-
In the Cloud9 environment interface
- View sidebar
- View structure of project
- lib / : This is where your stack or construct CDK projects are defined.
- bin / my-eks-blueprints.ts : This is the entrypoint of the CDK project. It will load the constructs defined in lib / .
You can see more documentation on CDK
- Validate AWS_DEFAULT_REGION and ACCOUNT_ID
export AWS_DEFAULT_REGION=ap-southeast-1
export ACCOUNT_ID=212454837823
- Note: remember to change your ACCOUNT_ID to perform the lab.
-
We initialize Boostrap account
- To bootstrapping we execute the command.
cdk bootstrap --trust=$ACCOUNT_ID \
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
aws://$ACCOUNT_ID/$AWS_REGION
- When executing bootstrap successfully, the following will appear:
Environment aws://212454837823/ap-southeast-1 bootstrapped.
-
Install dependencies.
- The dependencies need to be updated, open the file package.json and change the version of typescript to **4.6.
- Then do reinstall the package
rm -rf node_modules
npm i
-
After reinstalling the correct version
- We continue to run the command to install the eks-blueprints module for project
npm i @aws-quickstart/eks-blueprints