# lambda-rotate-payoneer-auth-token

This repository contains a lambda used to rotate the Payoneer Auth Token in AWS Secrets Manager.

### Environment management
`pyenv` can be used for managing environments between lambdas. View the Makefile for all commands, e.g. `make env`, `make lint` and `make test`.

### Environment variables for local testing
A `.env` file must be created in each lambda subdirectory if local variables are to be utilised.

### Running tests
Tests are run with Pytest and can be run using `make test`.

### Accessing AWS
AWS credentials must be requested from Devops for Dev and QA environments, which are required for executing the lambdas.

### Important development tools
https://github.com/warrensbox/terraform-switcher
https://github.com/broamski/aws-mfa

### Running lambda tests locally:

1. Checkout out this repository
2. Create a local env environment:
    `make env`
3. Activate environment
    `source env/bin/activate`
4. Run tests
    `make test`


### Pushing to this repo
Please fork this repo and create a PR from your own branch:
`git remote add <name> <git@thisforkedrepo...>`
