Skip to main content

advanced-cdk-constructs

Project description

Advanced CDK Constructs

A collection of advanced AWS CDK constructs to simplify AWS.

Installation

From NPM

npm install advanced-cdk-constructs

From GitHub

npm install git+https://github.com/spensireli/advanced-cdk-constructs.git

Available Constructs

GuardDuty Construct

The GuardDutyConstruct provides a simplified way to deploy AWS GuardDuty with common security configurations.

Import

import { GuardDutyConstruct, GuardDutyConstructProps } from 'advanced-cdk-constructs';

Basic Usage

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { GuardDutyConstruct } from 'advanced-cdk-constructs';

export class MyStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // Create GuardDuty with default settings
    const guardDuty = new GuardDutyConstruct(this, 'MyGuardDuty');
  }
}

Advanced Configuration

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { GuardDutyConstruct, GuardDutyConstructProps } from 'advanced-cdk-constructs';

export class MyStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const guardDutyProps: GuardDutyConstructProps = {
      enableGuardDuty: true,
      kubernetesAuditLogs: true,
      malwareProtection: true,
      s3Logs: true,
    };

    const guardDuty = new GuardDutyConstruct(this, 'MyGuardDuty', guardDutyProps);

    // Access the detector ID for other resources
    console.log('GuardDuty Detector ID:', guardDuty.detectorId);
  }
}

Configuration Options

Property Type Default Description
enableGuardDuty boolean true Whether to enable GuardDuty
kubernetesAuditLogs boolean true Enable Kubernetes audit logs monitoring
malwareProtection boolean true Enable malware protection for EC2 instances
s3Logs boolean true Enable S3 logs monitoring

Features

  • Runtime Monitoring: Automatically enabled for comprehensive threat detection
  • Kubernetes Audit Logs: Monitors Kubernetes cluster activities
  • Malware Protection: Scans EC2 instances for malware
  • S3 Logs Monitoring: Monitors S3 bucket activities for suspicious behavior
  • Detector ID Access: Public property to reference the detector in other constructs

Development

Prerequisites

  • Node.js 22.0.0 or higher
  • AWS CDK CLI
  • TypeScript

Setup

  1. Clone the repository:
git clone git@github.com:spensireli/advanced-cdk-constructs.git
cd advanced-cdk-constructs
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Testing

Run the test suite:

npm test

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues and questions, please open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spensireli_advanced_cdk_constructs-0.0.0.tar.gz (32.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file spensireli_advanced_cdk_constructs-0.0.0.tar.gz.

File metadata

File hashes

Hashes for spensireli_advanced_cdk_constructs-0.0.0.tar.gz
Algorithm Hash digest
SHA256 0e22321b66cba8b65c043ac61494b92ef0639ff62e83b37d250fb5b3686b3c57
MD5 f12d90e3b81ac23aa50fa28592aefcd7
BLAKE2b-256 39bd3f9e1a1c6dc6e6125a506b4e84e662562e8768037d6edb060a2fadea8aa9

See more details on using hashes here.

File details

Details for the file spensireli_advanced_cdk_constructs-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spensireli_advanced_cdk_constructs-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0bdebeb690ad53c7ef774bd937cdf5f15084b333a7c4bf8a96476ad9006d1c5b
MD5 9e1874c3a803f773e8c4624065a5480a
BLAKE2b-256 7fdb0958ca67be9b080d5dc1bb4ae9aa58c74a6751148d8aa548b72906e61bd6

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