aws-cdk-ssm-sdk-parameter
Thats an AWS CDK Construct for get and set the value of an SSM parameter. It is designed to be loose coupled and be not managed through AWS CDK / Cloudformation so that the SSM parameter can exist across different stacks and be updated without causing a drift. The looseness is reached through using CFN Custom Resources.
The implementation simply leverages AwsCustomResource as an SDK wrapper for:
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/get-parameter.html https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_GetParameter.html
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/put-parameter.html https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PutParameter.html
- https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/delete-parameter.html https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DeleteParameter.html
Features
- If the parameter doesn't exist, it will be created. Otherwise it pulls the current value of the parameter.
- optional delete when destroying the stack
Use Case
Initialize a parameter to some value upon creation, but allow it to diverge during future CDK deployments.
SSM StringParameter APP_VERSION of an image is used across ECS deployments. New ECS deployments use that latest version value in it. APP_VERSION isn't managed / editable with CDK but if APP_VERSION wouldn't exist you can specify kind of default.
Example
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
stack = cdk.Stack(app, "ssm-demo-stack", env=env)
# Create a loose coupled SSM Parameter from type String
SSMParameter(stack, "SSMParameter",
parameter_name="fooString",
default_value="fooValue"
)
# Create a loose coupled SSM Parameter from type StringList
SSMParameter(stack, "SSMParameterStringList",
parameter_name="fooStringList",
default_value="fooValue1,fooValue2,fooValue3",
type=SSMParameterType.StringList
)
# Delete the SSM Parameter if the stack gets deleted
SSMParameter(stack, "SSMParameterWithDelete",
parameter_name="fooWithDelete",
default_value="fooValue",
delete=True
)
Local Testing
For local testing simply run
yarn deploy --profile X
For destroying use
yarn destroy --profile X
Limitation
- SSM SecureString Parameter are not supported
- default description are not supported
Metadata
Release files for aws-cdk-ssm-sdk-parameter 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws-cdk-ssm-sdk-parameter-0.0.9.tar.gz | 23.2 kB | Without provenance | Details for aws-cdk-ssm-sdk-parameter-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_cdk_ssm_sdk_parameter-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for aws_cdk_ssm_sdk_parameter-0.0.9-py3-none-any.whl |
Total release size: 46.3 kB
Release files / aws-cdk-ssm-sdk-parameter-0.0.9.tar.gz
| Download URL | aws-cdk-ssm-sdk-parameter-0.0.9.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca035dc836ce827f8ff7aa207af13f15a612e9693bc01a20a78ae7c010fb023d
|
|
BLAKE2b-256 checksum How to use checksums |
2a2c1a9ed6cd8f0f6cb4ca72556f79779c738d58c307bc6e6d0e69fe8b847df6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|
Release files / aws_cdk_ssm_sdk_parameter-0.0.9-py3-none-any.whl
| Download URL | aws_cdk_ssm_sdk_parameter-0.0.9-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f28d1efd8164ff836e3555bd4bba05553f355522e6083fb9ae2d1d8ddfe39f5
|
|
BLAKE2b-256 checksum How to use checksums |
8db822ac114b8c2d166acd3ab0a7b140f829a7775044d69fc300a288ec885bc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
|
Security for aws-cdk-ssm-sdk-parameter 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.