Skip to main content

AWS CDK construct for AWS Chalice

Project description

cdk-chalice

PyPI Version PythonSupport PyPI status Downloads Build Status codecov Quality Gate Status Contributors

AWS CDK construct for AWS Chalice

This library allows to include an AWS Chalice application into a broader AWS Cloud Development Kit (AWS CDK) application.

The following approach to AWS CDK and AWS Chalice interoperability is taken by the library:

  1. Manually create Chalice application (chalice new-project) with default "dev" stage in .chalice/config.json. cdk-chalice library could perform this Chalice application scaffolding automatically - create new project, or skip this step if project already exists in the target directory (this is chalice new-project behavior). The choice to keep this step manual (for now) was made to hopefully make adoption easier for developers who already have existing Chalice projects.

  2. Manually create CDK application (cdk init [ARGS])

  3. Use cdk_chalice.Chalice class to generate stage per CDK stack in .chalice/config.json and run chalice package. This is the main purpose of cdk-chalice - allow passing CDK tokens for resources, such as DynamoDB table, to SAM template generated by chalice package (see example here), and also to automate the packaging process itself.

If AWS Chalice doesn't support certain options through its configuration mechanism, there are two ways to address this:

  • Open an issue for AWS Chalice
  • Customize the resources after they have been imported into the CDK stack. cdk-chalice uses AWS CDK cloudformation-include module to enable customization. See cdk-chalice API documentation for example and additional details.

The API documentation and usage example are available at https://cdk-chalice.softwhat.com/

Installation

Install and update using pip:

pip install -U cdk-chalice

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cdk-chalice, version 0.8.2
Filename, size File type Python version Upload date Hashes
Filename, size cdk_chalice-0.8.2-py3-none-any.whl (7.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cdk-chalice-0.8.2.tar.gz (6.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page