Antivirus for Amazon S3
Project description
@cloudcomponents/cdk-s3-antivirus
Antivirus for Amazon S3
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-s3-antivirus
Python:
pip install cloudcomponents.cdk-s3-antivirus
How to use
import { SnsDestination } from '@aws-cdk/aws-lambda-destinations';
import { Bucket } from '@aws-cdk/aws-s3';
import { Topic } from '@aws-cdk/aws-sns';
import { EmailSubscription } from '@aws-cdk/aws-sns-subscriptions';
import { Construct, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';
import { Scanner } from '@cloudcomponents/cdk-s3-antivirus';
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');
topic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL as string));
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
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 cloudcomponents.cdk-s3-antivirus-1.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e137d0753b6b8ceee1c59bb8dc71db28bcfc3a69e2b34a446fd4ceb4c0a802f1 |
|
MD5 | 060049fc002ac11325cc897a260d8d8b |
|
BLAKE2b-256 | 697f655fcf3cdf59c8a80519364c60044547aad685cfce7a6191177d7138bd12 |
Close
Hashes for cloudcomponents.cdk_s3_antivirus-1.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a3d553ec21815abdcfc90a5932f8bceb02b838dd5c8ef49b6b256a8380aa3b4 |
|
MD5 | 49b3d17b9271442e4dea3ea143e10297 |
|
BLAKE2b-256 | ba353cfcb9d3dd70c8b7695d7f77bcbe9eb7d85e07e66bc98095dbb810fee1b4 |