@aws-prototyping-sdk/pdk-nag
Project description
PDK Nag
PDKNag ships with a helper utility that automatically configures CDKNag within your application.
const app = PDKNag.app();
const stack = new Stack(app, 'MyStack');
...
As shown above, this will configure your application to have CDKNag run on synthesis.
By default, CDK will trigger a failure on synth
if any errors are encountered. To relax these, run the following:
cdk synth --ignore-errors
Conversely, CDK will not fail on synth if warnings are detected. To enforce that all warnings are resolved, run the following command:
cdk synth --strict
Instrumenting custom NagPacks
By default, when creating a PDKNag application the AwsSolutions NagPack is instrumented. In order to specify custom NagPacks to instrument, you can configure the PDKApp as follows:
import { PDKNag, AwsPrototypingChecks } from "@aws-prototyping-sdk/pdk-nag";
const app = PDKNag.app({
nagPacks: [new AwsPrototypingChecks()]
});
In this example, the AwsPrototypingChecks NagPack has been configured to run instead of the default. Multiple NagPacks can also be instrumented by adding NagPack instances to the nagPacks
array;
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
Hashes for aws_prototyping_sdk.pdk_nag-0.19.32.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64597ad89d48a922b1e172bb239458a92817fea3b1cd4e9fb8c79d580a4f35d9 |
|
MD5 | c915fdd308952336acd79e451f3bd7fa |
|
BLAKE2b-256 | 73a6def2199d3d3bdc727a63ebcac66e498b3c34f391035fd738f4a13d4cfce2 |
Hashes for aws_prototyping_sdk.pdk_nag-0.19.32-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53ebb47b4c1dfa068b1a568e90ef5660069fef33046c3ad90b942120cea56587 |
|
MD5 | 9050fb0a340305de1e831d14358b4fe7 |
|
BLAKE2b-256 | 47ecfc82679745c05878661562c369c5322d03e001513edabc2aa9df7f5ceb30 |