pip install -r requirements.txt
You need to set the following environment variables:
ESA_TOKEN
: Esa API token. To generate, go "Settings > User Settings > Applications > Generate new token". Because this token is tied to a user, it is recommended to use the token generated by the user who is expected to access the Esa team for a long period of time.SLACK_TOKEN
: User OAuth Token beginning withxoxp-
. You can obtain it from the "OAuth & Permissions" section of the app's administration page.
- Create a zip file for the python environment in AWS
pip install . -t layer/python
cd layer
zip -r mypackage.zip *
- Upload the zip file to create a layer of aws
- Activate the layer in the lambda function
- Set environment variables for lambda functions