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.8.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04e53234b709ed08fddd87bfd756630e2a3b3027d7ce15a6bd3428603ba44381 |
|
MD5 | 298a95144b52d94cdc13f1170ae015e7 |
|
BLAKE2b-256 | a6cc716941f1dc610575a5025fc4b479a9f4e300ec38087ddef2835b95132524 |
Close
Hashes for cdk_bootstrapless_synthesizer-0.8.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9107f2efa6552d0809bb1c6e0c3d591323dd4542e1476dfb1499c45fedbba448 |
|
MD5 | 7a04d67f6cf2499b37e3618d62b82c21 |
|
BLAKE2b-256 | 4da5420f97fafe7592bf4d957c4cf9e9266f8e4d04b0cbf523c122425e83ec49 |