Metadata-Version: 2.1
Name: mbonig.nightynight
Version: 1.85.4
Summary: A CDK construct that will automatically stop a running EC2 instance at a given time.
Home-page: https://github.com/mbonig/nightynight
Author: Matthew Bonig<matthew.bonig@gmail.com>
License: Apache-2.0
Project-URL: Source, https://github.com/mbonig/nightynight
Description: # NightyNight!
        
        Do you have a EC2 instance or an RDS instance that you only need during certain hours of the day? Do you want to reduce it's cost? How about just stopping it every night?
        
        That's the NightyNight construct. It's very simple. Give it an `instanceId` and it will create a Lambda and a CloudWatch Event Rule to fire the lambda at a specific time of day. If the instance is running, it's stopped.
        
        There are currently two variations of the construct:
        
        * [NightyNightForEc2](./API.md#matthewbonig-nightynight-nightynightforec2) - stops an EC2 instance at a given time.
        * [NightyNightForRds](./API.md#matthewbonig-nightynight-nightynightforrds) - stops an RDS instance at a given time.
        * [NightyNightForAsg](./API.md#matthewbonig-nightynight-nightynightforasg) - sets the desired capacity for an ASG at a given time.
        
        # This is a pre-release!
        
        This is a quick first-draft. All the options that will likely need to be added to accommodate a large
        number of use-cases are still needed. If you'd like to make requests or help update this construct, please
        open an [Issue](https://github.com/mbonig/nightynight/issues) or a [PR](https://github.com/mbonig/cicd-spa-website/pulls).
        
        # What it creates
        
        ![arch.png](./arch.png)
        
        * A Rule that will, on a given schedule, fire a lambda.
        * A Lambda with permissions to describe ec2 instances. It will read the instance by the given `instanceId` and then stop the instance if it's in a running state.
        
        # Example:
        
        ```python
        # Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
        from ..ec2 import NightyNightForEc2
        
        class NightyNightStack(Stack):
        
            def __init__(self, scope, id, props):
                super().__init__(scope, id, props)
        
                # The code that defines your stack goes here
                NightyNightForEc2(self, "nighty-night", instance_id="i-123123123123")
        ```
        
        This will stop the instance with id `i-123123123123` at (the default) 4am GMT.
        
        # API Doc
        
        See the [API Docs](./API.md) for more info.
        
        ## Contributing
        
        Please open Pull Requests and Issues on the [Github Repo](https://github.com/mbonig/nightynight).
        
        ## License
        
        MIT
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
