gammarers.aws-rds-database-auto-running-protection-stack


Namegammarers.aws-rds-database-auto-running-protection-stack JSON
Version 2.5.6 PyPI version JSON
download
home_pagehttps://github.com/gammarers/aws-rds-database-auto-running-protection-stack.git
SummaryThis construct is aws rds database or cluster auto running to stop.
upload_time2025-08-13 19:19:19
maintainerNone
docs_urlNone
authoryicr<yicr@users.noreply.github.com>
requires_python~=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS RDS Database Auto Running Protection Stack

[![GitHub](https://img.shields.io/github/license/gammarers/aws-rds-database-auto-running-protection-stack?style=flat-square)](https://github.com/gammarers/aws-rds-database-auto-running-protection-stack/blob/main/LICENSE)
[![npm (scoped)](https://img.shields.io/npm/v/@gammarers/aws-rds-database-auto-running-protection-stack?style=flat-square)](https://www.npmjs.com/package/@gammarers/aws-rds-database-auto-running-protection-stack)
[![PyPI](https://img.shields.io/pypi/v/gammarers.aws-rds-database-auto-running-protection-stack?style=flat-square)](https://pypi.org/project/gammarers.aws-rds-database-auto-running-protection-stack/)
[![Nuget](https://img.shields.io/nuget/v/Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack?style=flat-square)](https://www.nuget.org/packages/Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack/)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-rds-database-auto-running-protection-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-rds-database-auto-running-protection-stack/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-rds-database-auto-running-protection-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-rds-database-auto-running-protection-stack/releases)

[![View on Construct Hub](https://constructs.dev/badge?package=@gammarers/aws-rds-database-auto-running-protection-stack)](https://constructs.dev/packages/@gammarers/aws-rds-database-auto-running-protection-stack)

This constructor stack includes a function to automatically stop a database or cluster that will automatically start in 7 days.

> [!WARNING]
> v2.1.0:
> Stack props add option resourceNamingOption
> default ResourceNamingType.DEFAULT is cdk generated name
> if you want to maintain compatibility with versions below `v2.1.0`, please include the following settings (ResourceNamingType.AUTO).
>
> ```python
> new RDSDatabaseAutoRunningProtectionStack(app, 'RDSDatabaseAutoRunningProtectionStack', {
>   stackName: 'rds-database-auto-running-protection-stack',
>   targetResource: {
>     tagKey: 'AutoRunningProtection',
>     tagValues: ['YES'],
>   },
>   resourceNamingOption: {
>     type: RDSDatabaseAutoRunningProtectionStackResourceNamingType.AUTO, // HERE
>   },
> });
> ```

## Resources

This construct creating resource list.

* StepFunctions(StateMachine)
* IAM Role (StepFunctions)
* IAM Policy (StepFunctions)
* EventBridge
* IAM Role (EventBridge)

## Install

### TypeScript

#### install by npm

```shell
npm install @gammarers/aws-rds-database-auto-running-protection-stack
```

#### install by yarn

```shell
yarn add @gammarers/aws-rds-database-auto-running-protection-stack
```

#### install by pnpm

```shell
pnpm add @gammarers/aws-rds-database-auto-running-protection-stack
```

#### install by bun

```shell
bun add @gammarers/aws-rds-database-auto-running-protection-stack
```

### Python

```shell
pip install gammarers.aws-rds-database-auto-running-protection-stack
```

### C# / .NET

```shell
dotnet add package Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack
```

## Example

### Code

```python
import { RDSDatabaseAutoRunningProtectionStack } from '@gammarers/aws-rds-database-auto-running-protection-stack';

new RDSDatabaseAutoRunningProtectionStack(app, 'RDSDatabaseAutoRunningProtectionStack', {
  stackName: 'rds-database-auto-running-protection-stack',
  targetResource: {
    tagKey: 'AutoRunningProtection',
    tagValues: ['YES'],
  },
  resourceNamingOption: {
    type: RDSDatabaseAutoRunningProtectionStackResourceNamingType.DEFAULT,
  },
  notifications: {
    emails: [ // "Incoming Sample Message - EMAIL"
      'foo@example.com',
      'bar@example.net',
    ],
    slack: { // "Incoming Sample Message - Slack"
      webhookSecretName: 'example/slack/webhook', // Slack webhook secret
    },
  },
});
```

### Slack webhook secret

Please save it in AWS Secrets Manager in the following format.

get your slack webhook url parts

```text
https://hooks.slack.com/services/<workspace>/<channel>/<whebook>
```

| SecretKey 	 | SecretValue 	   |
|-------------|-----------------|
| Workspace 	 | <workspace> 	 |
| Channel   	 | <channel>   	 |
| Webhook   	 | <whebook>   	 |

## Incoming Sample Message

### EMAIL

![](./images/example-email.png)

### Slack

![](./images/example-slack.png)

## License

This project is licensed under the Apache-2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gammarers/aws-rds-database-auto-running-protection-stack.git",
    "name": "gammarers.aws-rds-database-auto-running-protection-stack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "yicr<yicr@users.noreply.github.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/f3/7d/7e0bc3ae511bacd75ae0f98b560c9ff2a0c384e51f913d0462f2ecc961c3/gammarers_aws_rds_database_auto_running_protection_stack-2.5.6.tar.gz",
    "platform": null,
    "description": "# AWS RDS Database Auto Running Protection Stack\n\n[![GitHub](https://img.shields.io/github/license/gammarers/aws-rds-database-auto-running-protection-stack?style=flat-square)](https://github.com/gammarers/aws-rds-database-auto-running-protection-stack/blob/main/LICENSE)\n[![npm (scoped)](https://img.shields.io/npm/v/@gammarers/aws-rds-database-auto-running-protection-stack?style=flat-square)](https://www.npmjs.com/package/@gammarers/aws-rds-database-auto-running-protection-stack)\n[![PyPI](https://img.shields.io/pypi/v/gammarers.aws-rds-database-auto-running-protection-stack?style=flat-square)](https://pypi.org/project/gammarers.aws-rds-database-auto-running-protection-stack/)\n[![Nuget](https://img.shields.io/nuget/v/Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack?style=flat-square)](https://www.nuget.org/packages/Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack/)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-rds-database-auto-running-protection-stack/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-rds-database-auto-running-protection-stack/actions/workflows/release.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-rds-database-auto-running-protection-stack?sort=semver&style=flat-square)](https://github.com/gammarers/aws-rds-database-auto-running-protection-stack/releases)\n\n[![View on Construct Hub](https://constructs.dev/badge?package=@gammarers/aws-rds-database-auto-running-protection-stack)](https://constructs.dev/packages/@gammarers/aws-rds-database-auto-running-protection-stack)\n\nThis constructor stack includes a function to automatically stop a database or cluster that will automatically start in 7 days.\n\n> [!WARNING]\n> v2.1.0:\n> Stack props add option resourceNamingOption\n> default ResourceNamingType.DEFAULT is cdk generated name\n> if you want to maintain compatibility with versions below `v2.1.0`, please include the following settings (ResourceNamingType.AUTO).\n>\n> ```python\n> new RDSDatabaseAutoRunningProtectionStack(app, 'RDSDatabaseAutoRunningProtectionStack', {\n>   stackName: 'rds-database-auto-running-protection-stack',\n>   targetResource: {\n>     tagKey: 'AutoRunningProtection',\n>     tagValues: ['YES'],\n>   },\n>   resourceNamingOption: {\n>     type: RDSDatabaseAutoRunningProtectionStackResourceNamingType.AUTO, // HERE\n>   },\n> });\n> ```\n\n## Resources\n\nThis construct creating resource list.\n\n* StepFunctions(StateMachine)\n* IAM Role (StepFunctions)\n* IAM Policy (StepFunctions)\n* EventBridge\n* IAM Role (EventBridge)\n\n## Install\n\n### TypeScript\n\n#### install by npm\n\n```shell\nnpm install @gammarers/aws-rds-database-auto-running-protection-stack\n```\n\n#### install by yarn\n\n```shell\nyarn add @gammarers/aws-rds-database-auto-running-protection-stack\n```\n\n#### install by pnpm\n\n```shell\npnpm add @gammarers/aws-rds-database-auto-running-protection-stack\n```\n\n#### install by bun\n\n```shell\nbun add @gammarers/aws-rds-database-auto-running-protection-stack\n```\n\n### Python\n\n```shell\npip install gammarers.aws-rds-database-auto-running-protection-stack\n```\n\n### C# / .NET\n\n```shell\ndotnet add package Gammarers.CDK.AWS.RDSDatabaseAutoRunningProtectionStack\n```\n\n## Example\n\n### Code\n\n```python\nimport { RDSDatabaseAutoRunningProtectionStack } from '@gammarers/aws-rds-database-auto-running-protection-stack';\n\nnew RDSDatabaseAutoRunningProtectionStack(app, 'RDSDatabaseAutoRunningProtectionStack', {\n  stackName: 'rds-database-auto-running-protection-stack',\n  targetResource: {\n    tagKey: 'AutoRunningProtection',\n    tagValues: ['YES'],\n  },\n  resourceNamingOption: {\n    type: RDSDatabaseAutoRunningProtectionStackResourceNamingType.DEFAULT,\n  },\n  notifications: {\n    emails: [ // \"Incoming Sample Message - EMAIL\"\n      'foo@example.com',\n      'bar@example.net',\n    ],\n    slack: { // \"Incoming Sample Message - Slack\"\n      webhookSecretName: 'example/slack/webhook', // Slack webhook secret\n    },\n  },\n});\n```\n\n### Slack webhook secret\n\nPlease save it in AWS Secrets Manager in the following format.\n\nget your slack webhook url parts\n\n```text\nhttps://hooks.slack.com/services/<workspace>/<channel>/<whebook>\n```\n\n| SecretKey \t | SecretValue \t   |\n|-------------|-----------------|\n| Workspace \t | <workspace> \t |\n| Channel   \t | <channel>   \t |\n| Webhook   \t | <whebook>   \t |\n\n## Incoming Sample Message\n\n### EMAIL\n\n![](./images/example-email.png)\n\n### Slack\n\n![](./images/example-slack.png)\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "This construct is aws rds database or cluster auto running to stop.",
    "version": "2.5.6",
    "project_urls": {
        "Homepage": "https://github.com/gammarers/aws-rds-database-auto-running-protection-stack.git",
        "Source": "https://github.com/gammarers/aws-rds-database-auto-running-protection-stack.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "285aa29e370bdd4cef9a675a1328db982d439cc4954fdf3d5297d1ce7e2a5349",
                "md5": "c73fde3a89b858900d673917fd62739d",
                "sha256": "ec9fc6cd1aaa04b6aaf42dabb2483e84c8319b08dcea5e9c4435b52f1c77b9c4"
            },
            "downloads": -1,
            "filename": "gammarers_aws_rds_database_auto_running_protection_stack-2.5.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c73fde3a89b858900d673917fd62739d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 228083,
            "upload_time": "2025-08-13T19:19:18",
            "upload_time_iso_8601": "2025-08-13T19:19:18.583893Z",
            "url": "https://files.pythonhosted.org/packages/28/5a/a29e370bdd4cef9a675a1328db982d439cc4954fdf3d5297d1ce7e2a5349/gammarers_aws_rds_database_auto_running_protection_stack-2.5.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f37d7e0bc3ae511bacd75ae0f98b560c9ff2a0c384e51f913d0462f2ecc961c3",
                "md5": "9c46ef3061231143e89fa7f7f7d7de07",
                "sha256": "52533c4594bb2439725c3c112d41e2288bb23d1fe2c4e4b644b3732e96400ecb"
            },
            "downloads": -1,
            "filename": "gammarers_aws_rds_database_auto_running_protection_stack-2.5.6.tar.gz",
            "has_sig": false,
            "md5_digest": "9c46ef3061231143e89fa7f7f7d7de07",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 229668,
            "upload_time": "2025-08-13T19:19:19",
            "upload_time_iso_8601": "2025-08-13T19:19:19.758284Z",
            "url": "https://files.pythonhosted.org/packages/f3/7d/7e0bc3ae511bacd75ae0f98b560c9ff2a0c384e51f913d0462f2ecc961c3/gammarers_aws_rds_database_auto_running_protection_stack-2.5.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-13 19:19:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gammarers",
    "github_project": "aws-rds-database-auto-running-protection-stack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gammarers.aws-rds-database-auto-running-protection-stack"
}
        
Elapsed time: 1.63029s