Skip to content
/ chalice-cicd-app Public template

Template repo for creating a Chalice application that deploys with a CI/CD pipeline defined by an AWS CDK app.

Notifications You must be signed in to change notification settings

folksgl/chalice-cicd-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chalice CI/CD App

Table of Contents

Overview

The chalice-cicd-app template repo is a serverless application that uses the AWS Chalice serverless framework. This repo includes both a hello-world Chalice app (located in /app), as well as a CI/CD pipeline (located in /pipeline) for deploying the code written using the AWS Cloud Development Kit. It is highly recommended that developers have a working understanding of the CDK, Chalice framework, and the underlying serverless AWS resources being manipulated during serverless development.

Installation

AWS CDK

To install the AWS CDK, please follow the AWS CDK installation instructions.

Setting up your environment

To set up your environment, follow these steps:

git clone https://github.com/folksgl/chalice-cicd-app.git
cd chalice-cicd-app
python3 -m venv venv38
source venv38/bin/activate
python3 -m pip install -r requirements.txt
pre-commit install

NOTE - Currently the latest Python runtime available in AWS Lambda is Python 3.8, so using versions other than 3.8 locally could cause runtime failures if your code depends on features not available in version 3.8

Development Flow

The development flow for this repo can be split into two streams. Work on the CI/CD pipeline to deploy the application is found under the pipeline while the application code can be done in the app directory.

Deploying the Chalice application

All deployments require having the correct AWS CLI credentials in place. If you haven't already, install the AWS CLI and set up credentials to your AWS account.

With the CI/CD pipeline

Before deploying with the CI/CD pipeline, you must create a CodeStar Connection to the GitHub account your repo is located in. Once that connection is created, store the ARN of the connection in a SecretsManager Secret, with the JSON key of 'arn'. In JSON, the secret should look like the following:

{ "arn": "<my-connection-arn>" }

To deploy the application with the CI/CD pipeline:

cd pipeline
cdk deploy --parameters ConnectionSecretId=<secret-id>

Without the pipeline

Deployments without the pipeline must change directories into the hello world directory. Chalice deployments can make direct usage of the chalice CLI tool using chalice local or chalice deploy commands. Please use chalice --help and see the Chalice documentation.

About

Template repo for creating a Chalice application that deploys with a CI/CD pipeline defined by an AWS CDK app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages