@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.14.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca7f24c48922124977c7dc0b4d12351e39b3709aeeaa3c0d7ded542ce1321293 |
|
MD5 | 5c2a194860ad0380017838008e454497 |
|
BLAKE2b-256 | 97f55f621175f18c6922b0311d20b94e79bf0df6bdb57cd168e145bd2dc98abf |
Hashes for aws_prototyping_sdk.pdk_nag-0.14.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5c4e043a357f2ea491cfc3969a3e6115dca1e94a76e4d1d34127a6929bcfae |
|
MD5 | 07a28b35538c2d4e5acf79ebde0a4284 |
|
BLAKE2b-256 | c142ec79ec07bbf67ce1ece3833bbf86a8d9313c12af62efa8d8d01b6cb5ee03 |