This sample contains an AWS AppConfig Extension which verifies that specified AWS Systems Manager Change Calendars are open before proceeding with the deployment.
The Lambda function for the extension itself is in lambda/index.py
; the CDK
stack is here to deploy it with the correct IAM permissions, and create an
AppConfig Extension.
Please see the AWS AppConfig documentation for details on configuring the service.
Please see the Systems Manager Change Calendar documentation for details on setting up Change Calendars.
Ensure you have an up-to-date Python install available, and AWS CDK v2 installed.
You will need Docker installed and running for CDK to build the Lambda function.
- Clone this repo
- In the cloned repo, create a Python virtual environment:
python -m venv .venv
- Activate your virtual environment:
source .venv/bin/activate
- Install the Python dependencies:
pip install -r requirements.txt
- Ensure you have suitable AWS credentials configured in your environment
- Have a(t least one) SSM Change Calendar
- Deploy this CDK app:
cdk deploy
. You only need to deploy it once per AWS Account/Region. - Navigate to the AppConfig console, then choose Extensions
- Choose the ChangeCalendar extension, then choose Add to resource
- Choose the Resource Type to associate the Extension with, and populate the following fields as required
- Under Parameters, for calendars, enter the name of your SSM Change Calendar. You can enter more than one by separating the names with commas
- Choose Create Association to Resource
- Navigate to the AppConfig console, then choose Extensions
- Choose the ChangeCalendar extension
- For each entry under Associated resources, choose the radio button then choose Remove association, then choose Delete
- Once you have removed all the Associated resources, you can
cdk destroy
the app
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.