Generate directly usable AWS CloudFormation template.
Project description
cdk-bootstrapless-synthesizer
A bootstrapless stack synthesizer that is designated to generate templates that can be directly used by AWS CloudFormation
Usage
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_bootstrapless_synthesizer import BootstraplessStackSynthesizer
# ...
app = cdk.App()
# You can set arguments directly
MyWidgetServiceStack(app, "MyWidgetServiceStack",
synthesizer=BootstraplessStackSynthesizer(
template_bucket_name="cfn-template-bucket",
image_asset_repository_name="ecr-repo-name",
file_asset_bucket_name="file-asset-bucket-${AWS::Region}",
file_asset_region_set=["us-east-1"],
file_asset_prefix="file-asset-prefix/latest/",
image_asset_tag="docker-image-tag",
image_asset_region="us-east-1",
image_asset_account_id="1234567890"
)
)
# Or by environment variables
# export BSS_TEMPLATE_BUCKET_NAME="cfn-template-bucket"
# export BSS_IMAGE_ASSET_REPOSITORY_NAME="ecr-repo-name"
# export BSS_FILE_ASSET_BUCKET_NAME="file-asset-bucket-\${AWS::Region}"
# export BSS_FILE_ASSET_REGION_SET="us-east-1,us-west-1"
# export BSS_FILE_ASSET_PREFIX="file-asset-prefix/latest/"
# export BSS_IMAGE_ASSET_TAG="docker-image-tag"
# export BSS_IMAGE_ASSET_REGION="us-east-1"
# export BSS_IMAGE_ASSET_ACCOUNT_ID="1234567890"
MyWidgetServiceStack(app, "MyWidgetServiceStack",
synthesizer=BootstraplessStackSynthesizer()
)
Synth AWS CloudFormation templates, assets and upload them
$ cdk synth
$ npx cdk-assets publish -p cdk.out/MyWidgetServiceStack.assets.json -v
In your template
{
// ...
"MyLayer38944FA5": {
"Type": "AWS::Lambda::LayerVersion",
"Properties": {
"Content": {
"S3Bucket": {
"Fn::Sub": "file-asset-bucket-${AWS::Region}"
},
"S3Key": "file-asset-prefix/latest/8104f93f351dd2d4e69b0ab2ebe9ccff2309a573660bd75ca920ffd1808522e0.zip"
}
}
}
// ...
}
Sample Project
See Sample Project
API Reference
See API Reference for API details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cdk-bootstrapless-synthesizer-0.7.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b295dedf40b9e701fa354d95f888555048ca8c09689bf05908023f6d8d0d4656 |
|
MD5 | 2d4d2ea076df1bc4e5c673cd619b078a |
|
BLAKE2b-256 | ceaa625e56d65605113b970537da5ea6811da5b13572fd156851b8775cbbc4d7 |
Close
Hashes for cdk_bootstrapless_synthesizer-0.7.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39b4f3520862866bdbbaf7553b52c1b3f7122d12f1829380f43135af72bef7ac |
|
MD5 | ce10e81d72e5b2b63a1b99f24e822266 |
|
BLAKE2b-256 | de6a740b0d31b54c7683103de906c118ab9cb50b1ebd01b2685226117a69f4e4 |