CDK Snippets for Python is an extension for the Visual Studio Code editor that provides code snippets for creating various components of an AWS service, such as REST APIs, resources, methods, integrations, models, and authorizers. The snippets are written in Python and are designed to be used with the AWS CDK library for defining cloud resources.
This extension is a great tool for developers who are working with AWS services and the AWS CDK library. It makes it easy to create and manage AWS resources with minimal code and effort, allowing developers to focus on building their applications.
This extension was inspired by the need to simplify the process of creating an AWS service. The AWS Cloud Development Kit (CDK) is a powerful tool for defining cloud resources, but the process of writing the code for creating an AWS service can be time-consuming and error-prone. The goal of this extension is to provide a convenient way to generate the boilerplate code needed to set up an AWS service, reducing the time and effort required to manually write the code.
This project is also inspired by Dr. Ayesha Ashfaq who has been doing a great job at SkipQ by making young graduates job ready by conducting extensive and fun training and shortening the gap between industry and academia. Her encouragement and guidance motivated me to contribute to open-source projects and make a positive impact on the developer community.
- The extension provides code snippets for creating various components of an AWS service, such as REST APIs, resources, methods, integrations, models, and authorizers.
- The snippets are written in Python and are designed to be used with the AWS CDK library for defining cloud resources.
- he extension also includes code snippets for creating different types of authorizers, such as token and request authorizers.
- It also has code snippets for creating different types of API definition, such as Asset, S3 and Inline API definition.
- The extension provides a convenient way to generate the boilerplate code needed to set up an AWS service, reducing the time and effort required to manually write the code.
- The extension also includes a description of each snippet, making it easy to understand their purpose and usage.
- It also has placeholders and tab stops which can help you to easily fill the required inputs.
- It also provides a prefix for each snippet which can be easily triggered by writing the prefix in the editor and pressing tab.
- Open VS Code
- Press
CTRL + SHIFT + X
(orCMD + SHIFT + X
on Mac) to open the Extensions pane - Search for "cdk snippents for python"
- Click the install button
- Reload VS Code
Once the extension is installed and activated, you can use the code snippets by typing the prefix of the snippet you want to use and then pressing TAB. For example, to use the AWS API Gateway service's REST API code snippet, you can type apigw-rest-api
and then press TAB. The snippet will be inserted into the editor.
s3
: Creates an S3 bucketcodebuild
: Creates a CodeBuild projectcodepipeline
: Creates a CodePipelinerds
: Creates an RDS instanceec2
: Creates an EC2 instancecloudfront
: Creates a CloudFront distribution
And more... Click here to know more about available snippets.
If you have a feature request or an issue, please head over to issues on GitHub.
You're welcome to contribute to this project by adding more snippets or fixing existing ones.
Muhammad Sameer, Ayesha Goheer
This extension is under the MIT license.
This extension is not affiliated with Amazon Web Services.