A library of CDK aspects applying to security groups.
Project description
cdk-aspects-library-security-group
A CDK library containing EC2 security group related CDK Aspects and the ability to define custom aspects.
Features
-
Utilize built in aspects for common cases:
- Disallow public access to any port
- Disallow public access to AWS Restricted Common ports (per the AWS Config rule)
- Disallow public access to SSH or RDP per CIS Benchmark guidelines and general good practice
-
Create any other aspect using the base security group aspect class.
-
By default aspects generate errors in the CDK metadata which the deployment or synth process will find, but this can be changed with the
annotationType
property
API Doc
See API
Examples
Typescript
// Add an existing aspect to your stack
Aspects.of(stack).add(new NoPublicIngressAspect());
// Add a custom aspect to your stack
Aspects.of(stack).add(new SecurityGroupAspectBase({
annotationText: 'This is a custom message warning you how you should not do what you are doing.',
annotationType: AnnotationType.WARNING,
ports: [5985],
restrictedCidrs: ['10.1.0.0/16'],
}));
// Change an existing aspects message and type
Aspects.of(stack).add(new NoPublicIngressAspect(
annotationText: 'This is custom text.',
annotationType: AnnotationType.WARNING
));
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
Close
Hashes for renovosolutions.aws-cdk-aspects-security-group-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc375463bd7189060cd6aa3d85d1186677b1b98d8e8a48e6346374fba15959ac |
|
MD5 | cd012a9aa9f4027b64e0acf551319eee |
|
BLAKE2b-256 | eb8aaf99a29fef0ae93688a2b014e374b564dc4bd3ecd21cf6e7fe7314db77f4 |
Close
Hashes for renovosolutions.aws_cdk_aspects_security_group-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6051f048423f7882edf14a7dcdba7be706f8e04c731c8742cd971af6d9c877fe |
|
MD5 | c9d82c7fdd6c82d357635436b5d82d6f |
|
BLAKE2b-256 | eb6573be48b4eb584da252277bb6a8443b78cbea5c7cb18dfededcf6a7fd488c |