cdk-mentor
Project description
cdk-mentor
This library acts as a mentor to AWS CDK users, providing guidance and suggestions for better infrastructure coding practices. Inspired by cfn_nag.
Overview Image
This library uses Aspects and is executed during the prepare phase.
Introduction
% npm install -D cdk-mentor
import * as cdk from 'aws-cdk-lib';
import * as sns from 'aws-cdk-lib/aws-sns';
import { TestStack } from '../lib/test-stack';
import { CdkMentor } from 'cdk-mentor';
const app = new cdk.App();
const stack = new TestStack(app, 'TestStack');
cdk.Aspects.of(app).add(new CdkMentor());
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as sns from 'aws-cdk-lib/aws-sns';
export class TestStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
new sns.Topic(this, 'testTopic'); // Construct ID is NOT PascalCase
}
}
% npx cdk synth -q
[Error at /TestStack/testTopic/Resource] [ERR:001]: Construct ID "testTopic"should be defined in PascalCase.
Found errors
Available Rules
- Recommends PascalCase for Construct IDs
- Avoid
StackorConstructin Construct IDs - Detecte strong cross-stack references
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
cdk_mentor-1.1.2.tar.gz
(1.1 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdk_mentor-1.1.2.tar.gz.
File metadata
- Download URL: cdk_mentor-1.1.2.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebf319dc892046f2f5708fb6b8f24e3fadb3b965a2f0870ee7841b8d5cf9d74
|
|
| MD5 |
f7f8ab689b8c1b8572d87ccf4557ff1c
|
|
| BLAKE2b-256 |
20f7647b123f0388a42dbcdf2d904483114853f7146415f1dafc56ffd993804d
|
File details
Details for the file cdk_mentor-1.1.2-py3-none-any.whl.
File metadata
- Download URL: cdk_mentor-1.1.2-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04835baaa45c8865870ea38851e054c681a8a5dd6601bdb00fa8b15f9855c7de
|
|
| MD5 |
761715e512c0d4bd25811b1dc68c7abe
|
|
| BLAKE2b-256 |
1018f8d22aa085f5e177097cd2da840e154de32154e9d698a364ae9454cd2f28
|