Created
September 18, 2021 20:55
-
-
Save thedavidprice/ac67656b1a3e2b32f31799cd4fb7cbec to your computer and use it in GitHub Desktop.
RedwoodJS Generated Serverless yml
This file contains hidden or 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
| # See the full yml reference at https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml/ | |
| service: app | |
| # Uncomment org and app if you want to integrate your deployment with the Serverless dashboard. See https://www.serverless.com/framework/docs/dashboard/ for more details. | |
| # org: your-org | |
| # app: your-app | |
| plugins: | |
| - serverless-dotenv-plugin | |
| custom: | |
| dotenv: | |
| include: | |
| - # List the environment variables you want to include from your .env file here. | |
| provider: | |
| name: aws | |
| runtime: nodejs12.x | |
| region: us-east-2 # This is the AWS region where the service will be deployed. | |
| httpApi: # HTTP API is used by default. To learn about the available options in API Gateway, see https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-vs-rest.html | |
| cors: true | |
| payload: '1.0' | |
| stackTags: # Add CloudFormation stack tags here | |
| source: serverless | |
| name: Redwood Lambda API with HTTP API Gateway | |
| tags: # Add service wide tags here | |
| name: Redwood Lambda API with HTTP API Gateway | |
| package: | |
| individually: true | |
| functions: | |
| graphql: | |
| description: graphql function deployed on AWS Lambda | |
| package: | |
| artifact: api/dist/zipball/graphql.zip # This is the default location of the zip file generated during the deploy command. | |
| memorySize: 1024 # mb | |
| timeout: 25 # seconds (max: 29) | |
| tags: # Tags for this specific lambda function | |
| endpoint: /.netlify/functions/graphql | |
| # Uncomment this section to add environment variables either from the Serverless dotenv plugin or using Serverless params | |
| # environment: | |
| # YOUR_FIRST_ENV_VARIABLE: ${env:YOUR_FIRST_ENV_VARIABLE} | |
| handler: graphql.handler | |
| events: | |
| - httpApi: | |
| path: /.netlify/functions/graphql | |
| method: GET | |
| - httpApi: | |
| path: /.netlify/functions/graphql | |
| method: POST | |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/.netlify/functions/graphql/.redwood/functionsI haven't checked — does this upload all functions in a project and not just
graphql.js? It needs to!It looks like there are more instructions for setting up Prisma
I just looked at the documentation here "Deploying to AWS Lambda" . It looks like a few things need to happen: