Skip to main content

@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

aws_prototyping_sdk.pdk_nag-0.19.46.tar.gz (98.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_prototyping_sdk.pdk_nag-0.19.46-py3-none-any.whl (96.5 kB view details)

Uploaded Python 3

File details

Details for the file aws_prototyping_sdk.pdk_nag-0.19.46.tar.gz.

File metadata

File hashes

Hashes for aws_prototyping_sdk.pdk_nag-0.19.46.tar.gz
Algorithm Hash digest
SHA256 86db6a2c0ed2785b834b03f77b54c48fffb5f5ddfa49a96da2bd3fe827d9bbe1
MD5 afed7183af9ac2b4a214fff85e0221a4
BLAKE2b-256 de11139e1ca07b6a5ee587c4656acdc56253b7c511dec6eec5943927974ab0b0

See more details on using hashes here.

File details

Details for the file aws_prototyping_sdk.pdk_nag-0.19.46-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_prototyping_sdk.pdk_nag-0.19.46-py3-none-any.whl
Algorithm Hash digest
SHA256 9f05e25e3e2624150a4dfc4adeb62becff2004908a70ac22045e81ba6c3b3337
MD5 4bffe0fd2e9752e7246eb26ceebfdc3e
BLAKE2b-256 d60ea22e88b17e964c3dd2b296a516a16fb0ad3743a13660f04996c04b59f8a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page