cloudcomponents.cdk-s3-antivirus


Namecloudcomponents.cdk-s3-antivirus JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/cloudcomponents/cdk-constructs
SummaryAntivirus for Amazon S3
upload_time2024-04-17 18:37:00
maintainerNone
docs_urlNone
authorhupe1980
requires_python~=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)

# @cloudcomponents/cdk-s3-antivirus

[![Build Status](https://github.com/cloudcomponents/cdk-constructs/workflows/Build/badge.svg)](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)
[![cdkdx](https://img.shields.io/badge/buildtool-cdkdx-blue.svg)](https://github.com/hupe1980/cdkdx)
[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@cloudcomponents/cdk-s3-antivirus)
[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-s3-antivirus/)

> Antivirus for Amazon S3

## Install

TypeScript/JavaScript:

```bash
npm i @cloudcomponents/cdk-s3-antivirus
```

Python:

```bash
pip install cloudcomponents.cdk-s3-antivirus
```

## How to use

```python
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](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-s3-antivirus/API.md).

## Example

See more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).

## License

[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-s3-antivirus/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cloudcomponents/cdk-constructs",
    "name": "cloudcomponents.cdk-s3-antivirus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "hupe1980",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/52/8b/ed8139e0cc0597d7aa22981b014735378aad500ee9790a93c78ce969fb7e/cloudcomponents.cdk-s3-antivirus-2.3.0.tar.gz",
    "platform": null,
    "description": "[![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)\n\n# @cloudcomponents/cdk-s3-antivirus\n\n[![Build Status](https://github.com/cloudcomponents/cdk-constructs/workflows/Build/badge.svg)](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)\n[![cdkdx](https://img.shields.io/badge/buildtool-cdkdx-blue.svg)](https://github.com/hupe1980/cdkdx)\n[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@cloudcomponents/cdk-s3-antivirus)\n[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-s3-antivirus/)\n\n> Antivirus for Amazon S3\n\n## Install\n\nTypeScript/JavaScript:\n\n```bash\nnpm i @cloudcomponents/cdk-s3-antivirus\n```\n\nPython:\n\n```bash\npip install cloudcomponents.cdk-s3-antivirus\n```\n\n## How to use\n\n```python\nimport { Scanner } from '@cloudcomponents/cdk-s3-antivirus';\nimport { RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';\nimport { SnsDestination } from 'aws-cdk-lib/aws-lambda-destinations';\nimport { Bucket } from 'aws-cdk-lib/aws-s3';\nimport { Topic } from 'aws-cdk-lib/aws-sns';\nimport { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';\nimport { Construct } from 'constructs';\n\nexport class S3AntivirusStack extends Stack {\n  constructor(scope: Construct, id: string, props: StackProps) {\n    super(scope, id, props);\n\n    const bucket = new Bucket(this, 'Bucket', {\n      autoDeleteObjects: true,\n      removalPolicy: RemovalPolicy.DESTROY,\n    });\n\n    const topic = new Topic(this, 'Topic');\n    if (process.env.DEVSECOPS_TEAM_EMAIL) {\n      topic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));\n    }\n\n    const scanner = new Scanner(this, 'Scanner', {\n      onResult: new SnsDestination(topic),\n      onError: new SnsDestination(topic),\n    });\n\n    scanner.addSourceBucket(bucket);\n  }\n}\n```\n\n## API Reference\n\nSee [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-s3-antivirus/API.md).\n\n## Example\n\nSee more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).\n\n## License\n\n[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-s3-antivirus/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Antivirus for Amazon S3",
    "version": "2.3.0",
    "project_urls": {
        "Homepage": "https://github.com/cloudcomponents/cdk-constructs",
        "Source": "https://github.com/cloudcomponents/cdk-constructs.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6888e56eb16c38ec7477c6d9dfbc74a2a3052c4e827824c6ef1012d5f73d24f4",
                "md5": "cdeafabe41a587fb43a6587b15578fed",
                "sha256": "502c2dece5ed4385987bffd3187ad1cd097646e49f960fc5062f0256527cef1a"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk_s3_antivirus-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cdeafabe41a587fb43a6587b15578fed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 13528918,
            "upload_time": "2024-04-17T18:36:45",
            "upload_time_iso_8601": "2024-04-17T18:36:45.396795Z",
            "url": "https://files.pythonhosted.org/packages/68/88/e56eb16c38ec7477c6d9dfbc74a2a3052c4e827824c6ef1012d5f73d24f4/cloudcomponents.cdk_s3_antivirus-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "528bed8139e0cc0597d7aa22981b014735378aad500ee9790a93c78ce969fb7e",
                "md5": "0e126fe2cdd13bd714b8a175ad767e20",
                "sha256": "5bde772ef996fa65fd6bc809ba7f879541362e68f5795f11afd088be08dca956"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk-s3-antivirus-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0e126fe2cdd13bd714b8a175ad767e20",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 13530237,
            "upload_time": "2024-04-17T18:37:00",
            "upload_time_iso_8601": "2024-04-17T18:37:00.691277Z",
            "url": "https://files.pythonhosted.org/packages/52/8b/ed8139e0cc0597d7aa22981b014735378aad500ee9790a93c78ce969fb7e/cloudcomponents.cdk-s3-antivirus-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-17 18:37:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudcomponents",
    "github_project": "cdk-constructs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cloudcomponents.cdk-s3-antivirus"
}
        
Elapsed time: 0.23986s