Metadata-Version: 2.1
Name: ssm-loader
Version: 0.2.4
Summary: Python app to load SSM
Home-page: UNKNOWN
Author: DNX Solutions
Author-email: contact@dnx.solutions
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: awscli (==1.18.111)
Requires-Dist: boto3 (==1.14.34)
Requires-Dist: click (==7.1.2)
Provides-Extra: build
Requires-Dist: twine ; extra == 'build'
Requires-Dist: setuptools ; extra == 'build'
Requires-Dist: wheel ; extra == 'build'
Provides-Extra: test
Requires-Dist: moto (==1.3.13) ; extra == 'test'
Requires-Dist: pytest (==6.0.1) ; extra == 'test'
Requires-Dist: pytest-cov (==2.10.0) ; extra == 'test'
Requires-Dist: flake8 (==3.8.3) ; extra == 'test'

# ssm-loader

![Build](https://github.com/DNXLabs/ssm-loader/workflows/Build/badge.svg)
[![codecov.io](https://codecov.io/gh/DNXLabs/ssm-loader/coverage.svg?branch=master)](https://codecov.io/gh/DNXLabs/ssm-loader?branch=master)
[![PyPI](https://badge.fury.io/py/ssm-loader.svg)](https://pypi.python.org/pypi/ssm-loader/)
[![LICENSE](https://img.shields.io/github/license/DNXLabs/ssm-loader)](https://github.com/DNXLabs/ssm-loader/blob/master/LICENSE)

This project aims to help dump and load AWS SSM parameters.


## Usage Example
```bash
# One .json file will be generated in your local with all variables
ssm dump "/app/myapp/app-path"

# All variables described will be inputed inside the IAM configured
ssm load -f ssm.json
```

## Dependencies
- Docker

## Load file format
The file to use the `ssm load` command should be in this format.
```json
{
    "parameters": [
        {
            "Name": "param1",
            "Value": "value1"
        }
    ]
}
```

## Docker

#### Build
Now you are ready to build an image from this project Dockerfile.
```bash
docker build -t ssm .
```

#### Run

After your image has been built successfully, you can run it as a container. In your terminal, run the command docker images to view your images.

```bash
# Dump
docker run -rm \
    -e AWS_REGION='ap-southeast-2' \
    -e AWS_ACCESS_KEY_ID='<your-access-key-id>' \
    -e AWS_SECRET_ACCESS_KEY='<your-secret-access-key>' \
    ssm dump "/app/myapp/app-path"

# Loading
docker run -rm \
    -e AWS_REGION='ap-southeast-2' \
    -e AWS_ACCESS_KEY_ID='<your-access-key-id>' \
    -e AWS_SECRET_ACCESS_KEY='<your-secret-access-key>' \
    ssm load -f ssm.json
```

## Setup development environment

#### Install dependencies

```bash
make build
```

#### Run
```bash
make run
```

#### Test
```bash
make test
```

#### Lint Flake8
```bash
make flake8
```

## Author
App managed by [DNX Solutions](https://github.com/DNXLabs).

## License
Apache 2 Licensed. See [LICENSE](https://github.com/DNXLabs/ssm-loader/blob/master/LICENSE) for full details.

