cycl is a CLI and Python SDK to help identify cross-stack import/export circular dependencies, for a given AWS account and region. The successor to circular-dependency-detector, which was built at the University of Texas at Austin.
Install cycl
by running pip install cycl
.
cycl check --exit-zero
- exit 0 regardless of resultcycl check --log-level
- set the logging level (default: WARNING)cycl check --cdk-out /path/to/cdk.out
- path to cdk.out, where stacks are CDK synthesized to CFN templates
There are two main use cases for cycl
.
- In a pipeline.
cycl
is best used to detect circular dependencies before a deployment. If you're using the AWS CDK v2 (v1 support coming soon), simply synthesize you templates to a directory and pass that directory tocycl
using--cdk-out-path some-path-here
. This allowscycl
to find all existing cycles and then those to be introduced by the deployment. This prevents the circular dependency from ever being introduced. If your pipeline deploys more than once, you should executecycl
before each deployment. - To perform analysis. While a CLI is best used in a pipeline, if you require analysis which is not currently supported, you can use the SDK. The SDK gives you all the information that
cycl
collects.
Over the lifetime of a project, circular references are bound to be introduced. They may not be noticed until you need to re-deploy some infrastructure. A good example is disaster recovery testing and potentially deploying all your infrastructure from scratch in a new region. This tool detects those changes.
cycl
is being actively developed, instructions will come as it becomes more stable.