Skip to main content

Antivirus for Amazon S3

Project description

cloudcomponents Logo

@cloudcomponents/cdk-s3-antivirus

Build Status cdkdx typescript python

Antivirus for Amazon S3

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-s3-antivirus

Python:

pip install cloudcomponents.cdk-s3-antivirus

How to use

import { Scanner } from '@cloudcomponents/cdk-s3-antivirus';
import { RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { SnsDestination } from 'aws-cdk-lib/aws-lambda-destinations';
import { Bucket } from 'aws-cdk-lib/aws-s3';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { Construct } from 'constructs';

export class S3AntivirusStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps) {
    super(scope, id, props);

    const bucket = new Bucket(this, 'Bucket', {
      autoDeleteObjects: true,
      removalPolicy: RemovalPolicy.DESTROY,
    });

    const topic = new Topic(this, 'Topic');
    if (process.env.DEVSECOPS_TEAM_EMAIL) {
      topic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
    }

    const scanner = new Scanner(this, 'Scanner', {
      onResult: new SnsDestination(topic),
      onError: new SnsDestination(topic),
    });

    scanner.addSourceBucket(bucket);
  }
}

API Reference

See API.md.

Example

See more complete examples.

License

MIT

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

cloudcomponents.cdk-s3-antivirus-2.0.0.tar.gz (11.1 MB 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 cloudcomponents.cdk-s3-antivirus-2.0.0.tar.gz.

File metadata

  • Download URL: cloudcomponents.cdk-s3-antivirus-2.0.0.tar.gz
  • Upload date:
  • Size: 11.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.1 readme-renderer/30.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.2.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for cloudcomponents.cdk-s3-antivirus-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9ac048a309c470862c2c4d03b82d1eddac0138abe73515f4227c99cfaf2e39ef
MD5 863a7c79ed9a78d7ff3d8ef5157348b6
BLAKE2b-256 46fd069b2b2894e5c5aea74adda0d4eb240ec4fce6c9a490e55a088b278199dc

See more details on using hashes here.

File details

Details for the file cloudcomponents.cdk_s3_antivirus-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: cloudcomponents.cdk_s3_antivirus-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.1 readme-renderer/30.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.2 keyring/23.2.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for cloudcomponents.cdk_s3_antivirus-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e27f52750a6cba751ce1a16441edd5b1fb650039ebd61205d2220f35fe352c1
MD5 d8a6feec50bb7b5ab3899ba6b2afb496
BLAKE2b-256 fd1da061e8ff1beb8b63f41638556208087c4e0ba86ade0f6167d8d8a1fd4609

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