2. Create a new directory named `sample` for your project and run `cdk init app --language typescript` to initialize a CDK project. You can choose language as csharp, fsharp, go, java, javascript, python or typescript.
This will create a sample lambda function that returns "hello world" when invoked.
#### Bootstrap the CDK project
Before you deploy your project. You need to bootstrap your project. This will create a CloudFormation stack that will be used to deploy your project. You can bootstrap your project by running `cdk bootstrap`.
Learn more about bootstrapping [here](https://docs.aws.amazon.com/cdk/latest/guide/bootstrapping.html).
##### Deploy the Project
1. Run `npm install` to install all the dependencies for your project whenever you make changes.
2. Run `cdk synth` to synthesize the CloudFormation template for your project. You will see a new file called `cdk.out/CDKToolkit.template.json` that contains the CloudFormation template for your project.
3. Run `cdk diff` to see the changes that will be made to your AWS account. You will see a new stack called `SampleStack` that will create a lambda function and all the changes associated with it.
4. Run `cdk deploy` to deploy your project. You should see a new stack called created in your AWS account under CloudFormation.
5. Go to Lambda console and you will see a new lambda function called `SampleLambda` created in your account.