awslabs / awslabs/aws-deployment-framework

Using package_transform.sh in combination with CDK stacks

Open
#438 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
699
Forks
235
Avg merge
20h 53m
Merged PRs (30d)
7

Description

We use CDK and in order to deploy my CDK stack I need to do the following:

- cdk synth --no-staging -q
- sam build -t ./cdk.out/.template.json
- mv .aws-sam/build/template.yaml .aws-sam/build/template.yml
- Read template.yml and check if there are parameters that start with: `AssetParameters` if so remove them
- mv ./.aws-sam/build/* .
- bash adf-build/helpers/package_transform.sh --no-build

So a few questions regarding this process:

1. Does anyone how you can generate a CFN template without asset parameters? (these are added by CDK but the `sam cli` is taking this over, see: [Better together: AWS SAM and AWS CDK
](https://aws.amazon.com/blogs/compute/better-together-aws-sam-and-aws-cdk/))
1. Are there things that I might not considered?
1. Is this something we might want to support from ADF? (The `--no-build` action is needed otherwise the build happens again but then on the already build template)

Contributor guide

Open the contributing guide

Research direction

Start with the listed cdk synth and sam build commands, then inspect adf-build/helpers/package_transform.sh and the generated .aws-sam/build/template.yml. Determine whether ADF should support this CDK-to-SAM workflow without rebuilding, and define the expected handling of AssetParameters and the transformed template.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, bash
Domain
cloud, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.