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
MyStack(app, "my-stack-dev",
synthesizer=BootstraplessStackSynthesizer(
template_bucket_name="cfn-template-bucket",
file_asset_bucket_name="file-asset-bucket-${AWS::Region}",
file_asset_region_set=["us-west-1", "us-west-2"],
file_asset_prefix="file-asset-prefix/latest/",
image_asset_repository_name="your-ecr-repo-name",
image_asset_account_id="1234567890",
image_asset_tag_prefix="latest-",
image_asset_region_set=["us-west-1", "us-west-2"]
)
)
# Or by environment variables
# export BSS_TEMPLATE_BUCKET_NAME="cfn-template-bucket"
# export BSS_FILE_ASSET_BUCKET_NAME="file-asset-bucket-\${AWS::Region}"
# export BSS_FILE_ASSET_REGION_SET="us-west-1',us-west-2"
# export BSS_FILE_ASSET_PREFIX="file-asset-prefix/latest/"
# export BSS_IMAGE_ASSET_REPOSITORY_NAME="your-ecr-repo-name"
# export BSS_IMAGE_ASSET_ACCOUNT_ID="1234567890"
# export BSS_IMAGE_ASSET_TAG_PREFIX="latest-"
# export BSS_IMAGE_ASSET_REGION="us-west-1',us-west-2"
MyStack(app, "my-stack-dev",
synthesizer=BootstraplessStackSynthesizer()
)
Synth AWS CloudFormation templates, assets and upload them
$ cdk synth
$ npx cdk-assets publish -p cdk.out/my-stack-dev.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.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3a231cddf00b662fefb6d5fb9bda72fc49b1541163add5102d0b005bd45cc0d |
|
MD5 | b0c10aff1c7d62246cb4937f9e94dfb7 |
|
BLAKE2b-256 | 9d584c81e4d0cf2667bb52673b4a6bd4f8a971943f8c2045499a174a79904c81 |
Close
Hashes for cdk_bootstrapless_synthesizer-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 957f0017710a51c8180afb292b058af05eab5697a56d91bc027599ccd7027be1 |
|
MD5 | d0b4167ac5dd630c57d973302d3b82fc |
|
BLAKE2b-256 | cbf83b4a48d16c7a9f26e1f1e37117a3e202cdac6041cea71bd610e4114ad296 |