**** Create your aws user and give them access to the CLI
Start by creating a user
We need our user to be able to deploy ressources and to do that they will need Administrator Access
Click on attach policies
And Select the AdministratorAccess policy
After you've created your user go to security credentials and create an access key, we will need it to configure the user to access the cli
Select the first option and store your key because you won't be able to access it again
Link to install AWS CLI if you don't have it installed
To configure the user run the commande :
aws configure
It takes the following parameters :
The public access key
The private access key
The Region
And the default output format
To install the AWS CDK CLI, open your terminal and run the following command
sudo npm install -g aws-cdk
AWS provides variety of project examples for different languages.
aws-samples / aws-cdk-examples
Example projects using the AWS CDK
AWS CDK Examples
This repository contains a set of example projects for the AWS Cloud Development Kit.
Table of Contents
About this Repo
This repo is our official list of CDK example code. The repo is subdivided into sections for each language (see "Examples"). Each language has its own subsection of examples with the ultimate aim of complete language parity (same subset of examples exist in each language). These examples each provide a demonstration of a common service implementation, or infrastructure pattern that could be useful in your use of the CDK for building your own infrastructure.
We welcome contributions to this repo in the form of fixes to existing examples or addition of new examples. For more information on contributing, please see the CONTRIBUTING guide.
This is considered an intermediate learning resource and should typically be referenced after…
Before we create our first CDK project you can check the supported languages here in the official documentation
The AWS CDK supports several languages including TypeScript, JavaScript, Python, Java, and C#.
To create the CDK project run this commande, replacing $LANGUAGE with your preferred programming language, and it will initialize it with the necessary files and directories for that language
cdk -init --language=$LANGUAGE
Before deploying your CDK project, you need to bootstrap your environment.
Bootstrapping is the process of preparing an environment for deployment. Bootstrapping is a one-time action that you must perform for every environment that you deploy resources into.
cdk bootstrap
Now that your environment is prepared, you can deploy your project to your AWS account using the following command
cdk deploy
Now if you go back to the console and select the configured region then search your CloudFormation you will see your deployed stack
Top comments (0)