https://github.com/optimizely/serverless-sendtoslack
https://github.com/optimizely/serverless-sendtoslack
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/optimizely/serverless-sendtoslack
- Owner: optimizely
- Archived: true
- Created: 2017-05-10T17:32:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-06T20:14:03.000Z (almost 9 years ago)
- Last Synced: 2025-03-16T13:42:15.208Z (12 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 7
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Serverless: https://serverless.com/framework/docs/providers/aws/guide/installation/
## Specifying an S3 Bucket
It is recommended that you setup a specific bucket in S3 for Serverless to keep the Cloudformation templates in. This will need to be set in your `serverless.yml` file, and must be unique. If you choose not to set a specific bucket (by removing the `deploymentBucket` key), a new one will be created on every deploy.
## Vendoring Dependencies
To install python package dependencies (`requirements.txt`) use the included
`build.sh` script:
```console
$ ./build.sh
```
This runs an `amazonlinux` docker container, matching the environment of AWS
Lambda, ensuring dependencies are compiled to the correct OS.
These dependencies won't work when invoking the function locally if you're
developing on OSX. In that case you should create a virtualenv and install the
dependencies manually:
```console
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
```
## Deployment
Start by (Vendoring Dependencies)[#vendoring-dependencies], then install
serverless:
```console
$ npm install -g serverless
```
Deploy the function with:
```console
$ serverless deploy
```