# Fansifter CloudFormation Templates

## Templates
AWS CloudFormation templates in `cloudformation/` folder are preprocessed by Jinja2 template engine.
You can use environment variables from `os.environ` (e.g. `ENVIRONMENT`) and custom variables from `service.yml` (e.g. `serviceName`) in your templates.

## Deployment
Each template in `cloudformation/` folder is deployed as a separate CF stack.

After making changes to `cloudformation/` templates or editing `service.yml`, they can be deployed via CloudFormation using this command (NB! check `AWS_PROFILE` value):
```bash
AWS_REGION=eu-west-1 AWS_PROFILE=default ENVIRONMENT=dev make infra-deploy
```

Values of `ENVIRONMENT` currently in use are: `dev`, `test` and `live`.

To destroy all stacks:
```bash
AWS_REGION=eu-west-1 AWS_PROFILE=default ENVIRONMENT=dev make infra-destroy
```