Metadata-Version: 2.1
Name: sceptre_s3_packager
Version: 0.1.0
Summary: S3 packager for Sceptre 2
Home-page: https://github.com/henrist/sceptre-s3-packager
Author: Henrik Steen
License: UNKNOWN
Description: # sceptre-s3-packager
        
        Hook and resolver for [Sceptre](https://sceptre.cloudreach.com/latest/) `v2` to
        package code dependencies and uploading it to an S3 bucket for usage in a
        template.
        
        Inspired by https://github.com/cloudreach/sceptre-zip-code-s3
        
        ## Getting started
        
        Install using pip:
        
        ```bash
        pip install sceptre-s3-packager
        ```
        
        Use the hook and resolver in your template config:
        
        ```
        template_path: ...
        hooks:
          before_create:
            - !sceptre_s3_packager ./directory-to-zip-to-s3
          before_update:
            - !sceptre_s3_packager ./directory-to-zip-to-s3
        sceptre_user_data:
          Code:
            S3Bucket: my-s3-bucket
            S3Key: !sceptre_s3_packager ./directory-to-zip-to-s3
        ```
        
        Use the data in the template, e.g. by using Jinja2 template with something
        like:
        
        ```
          MyLambda:
            Type: AWS::Lambda::Function
            Properties:
              Code:
                S3Bucket: {{ sceptre_user_data.Code.S3Bucket }}
                S3Key: {{ sceptre_user_data.Code.S3Key }}
        ```
        
        ## Usage
        
        Hook:
        
        - `!sceptre_s3_packager <directory>` (reads `S3Bucket` from
          `sceptre_user_data.Code.S3Bucket`)
        - `!sceptre_s3_packager <directory>^^<s3-bucket>`
        
        Resolver:
        
        - `!sceptre_s3_packager <directory>` (returns a path where the packaged
          directory is uploaded, e.g. `sceptre/68063a99bb6d95401d688d28f19ee412`)
        
        ## Details
        
        The hook will will zip the contents of the directory and upload it as
        `sceptre/MD5HASH` to the S3-bucket, with `MD5HASH` being md5 hash of the zip
        file content.
        
        When zipping all files will be given a fixed modification time, so that only
        the contents of the files are used to determine the upload file and cause
        invalidation on changes.
        
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
