Metadata-Version: 2.1
Name: aws-cloudformation-power-switch
Version: 0.1.8
Summary: shutdown and startup AWS CloudFormation EC2 and RDS instances
Home-page: https://github.com/binxio/aws-cloudformation-power-switch
Author: Mark van Holsteijn
Author-email: mark@binx.io
License: BSD
Description: # AWS CloudFormation power switch
        AWS CloudFormation power switch allows you to shutdown and startup all EC2, RDS and AutoScaling instances managed
        by one or more CloudFormation stacks.
        
        ## install the power switch
        to install the power switch, type:
        
        ```sh
        pip install aws-cloudformation-power-switch
        ```
        
        ## shutdown
        to shutdown all instances managed by CloudFormation stacks starting with the name `dev`, type:
        ```sh
        cfn-power-switch --dry-run --stack-name-prefix dev on
        ```
        This will show you which EC2, RDS and AutoScaling instances will be shutdown. For Auto Scaling groups, the 
        desired number of instances is set to 0. If the minimum is greater than 0, it will change the minimum setting too.
        
        ## startup`
        to startup all instances managed by a CloudFormation stacks starting with the name `dev`, type:
        ```sh
        cfn-power-switch --dry-run --stack-name-prefix dev off
        ```
        This will show you which EC2, RDS and AutoScaling instances will be started. The AutoScaling desired number of 
        instances will be set the maximum desired instances. Remove the `--dry-run` and it will be activated.
        
        
        ## deploy the power switch
        To deploy the power switch as an AWS Lambda, type:
        
        ```sh
        git clone https://github.com/binxio/aws-cloudformation-power-switch.git
        cd aws-cloudformation-power-switch.git
        aws cloudformation deploy \
        	--capabilities CAPABILITY_IAM \
        	--stack-name aws-cloudformation-power-switch \
        	--template-file ./cloudformation/aws-cloudformation-power-switch.yaml \
            --override-parameters \
                StackNamePrefix=dev \
        	    "Startup=cron(30 7 ? * MON-FRI *)" \
                "Shutdown=cron(30 23 ? * MON-FRI *)"
        ```
        This will shutdown down all EC2, RDS and Auto Scaling instances managed by CloudFormation stacks starting with the
        name `dev` at 23:30 and start them backup at 7:30 in the morning.
        
        ## caveats
        the RDS clusters are not detected as CloudFormation does not place `aws:cloudformation:` tags on the resource.
        
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
