Created
October 30, 2020 18:06
-
-
Save bunnyhawk/572c0857b2da2887b7dc579c56d12b1d to your computer and use it in GitHub Desktop.
aws nodemailer yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: covid-api # The name of our service in AWS | |
package: | |
exclude: | |
- secrets.yml | |
custom: | |
stage: ${opt:stage, self:provider.stage} | |
secrets: ${file(secrets.yml):${self:custom.stage}} | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: dev # Using dev here, but could be stage or production as well | |
region: us-west-2 # Use whatever region makes sense for your location / project | |
apiGateway: | |
binaryMediaTypes: | |
- "*/*" # Make sure the form is ready to pass data and files | |
environment: | |
MAIL_ACCESS: "${self:custom.secrets.MAIL_ACCESS}" # Our password via a secrets config. More on this below | |
functions: | |
covidApi: | |
handler: handler.covidApi # This is our exported handler value | |
name: ${self:provider.stage}-covidApi-lambda # for dev, lambda would be named "dev-covidApi-lambda" | |
events: | |
- http: | |
path: send-mail # this will be our eventual API path | |
method: post | |
cors: true | |
private: false | |
request: | |
parameters: | |
headers: | |
- "Accept" | |
- "Content-Type" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment