cloudcomponents.cdk-s3-antivirus


Namecloudcomponents.cdk-s3-antivirus JSON
Version 2.4.0 PyPI version JSON
download
home_pagehttps://github.com/cloudcomponents/cdk-constructs
SummaryAntivirus for Amazon S3
upload_time2024-05-16 19:33:54
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/ef/25/2e6efcbb7a9ca36914e56e55c989fe151f2f87304be70e95fa6239a22217/cloudcomponents.cdk-s3-antivirus-2.4.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.4.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": "acc9566ac4b119f94acf3cd0ca3c4ff99fc60972ceeee64860805c55873b369e",
                "md5": "8e91fd9a782877bc8fce39003194ce35",
                "sha256": "49638fda8bd9b3117c0f55253d5c6597a24c99e7e13bb802301b97845f3f2121"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e91fd9a782877bc8fce39003194ce35",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 11135743,
            "upload_time": "2024-05-16T19:33:19",
            "upload_time_iso_8601": "2024-05-16T19:33:19.331463Z",
            "url": "https://files.pythonhosted.org/packages/ac/c9/566ac4b119f94acf3cd0ca3c4ff99fc60972ceeee64860805c55873b369e/cloudcomponents.cdk_s3_antivirus-2.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef252e6efcbb7a9ca36914e56e55c989fe151f2f87304be70e95fa6239a22217",
                "md5": "fba44dfd03b1545a8c2baf65dec8af37",
                "sha256": "bf8f0474b78f9e12d1172ab793c9431c8f0890b53b67b3ba738721ab20a1c22b"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fba44dfd03b1545a8c2baf65dec8af37",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 11136839,
            "upload_time": "2024-05-16T19:33:54",
            "upload_time_iso_8601": "2024-05-16T19:33:54.647464Z",
            "url": "https://files.pythonhosted.org/packages/ef/25/2e6efcbb7a9ca36914e56e55c989fe151f2f87304be70e95fa6239a22217/cloudcomponents.cdk-s3-antivirus-2.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 19:33:54",
    "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: 4.96065s