Library of helpful constants to work with the CDK
This repository contains constants that make it easier to work with the aws-cdk (CDK).
The CDK is awesome but it currently lacks types when initializing constructs such as IAM service principals and managed policies. Finding the right construct names requires diving into AWS documentation. Because there is no verification of these construct initializers, errors are only surfaced after deployment and via a rollback.
This library aims to be an up to date constants library for all things AWS so the above never happens again!
Install or update from npm
npm i cdk-constants
pip install cdk-constants
** TypeScript **
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 from cdk_constants import ServicePrincipals, ManagedPolicies lambda_role = Role(self, "lambdaDomainChecker", assumed_by=ServicePrincipal(ServicePrincipals.LAMBDA), managed_policies=[ ManagedPolicy.from_aws_managed_policy_name(ManagedPolicies.AWS_LAMBDA_BASIC_EXECUTION_ROLE) ] )
** Python **
from cdk_constants import ServicePrincipals, ManagedPolicies lambda_role = Role(self, "lambdaDomainChecker", assumed_by=ServicePrincipal(ServicePrincipals.LAMBDA), managed_policies=[ ManagedPolicy.from_aws_managed_policy_name(ManagedPolicies.AWS_LAMBDA_BASIC_EXECUTION_ROLE) ] )
- AWS services principals
- Managed AWS policies
cdk-constants wouldn't be possible without modules from the following authors
- Jared Short: initial gist of all service principals
- Gene Wood: gist to pull all aws managed policies
All contributors are welcome. As you are reading this, AWS has probably released a new service. Please see CONTRIBUTING for information on how to setup a development environment and submit code.
Some upcoming items on the roadmap:
- list of aws regions and azs, including gov and china
- list of all iam permissions
- [x] jsii compilation into different languages that CDK supports
cdk-constants is distributed under the Apache License, Version 2.0.
See LICENSE for more information.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size cdk-constants-3.0.3.tar.gz (240.6 kB)||File type Source||Python version None||Upload date||Hashes View hashes|