- Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch3/bff-graphql-crud --path cncb-bff-graphql-crud
- Navigate to the cncb-bff-graphql-crud directory with cd cncb-bff-graphql-crud.
- Review the file named serverless.yml with the following content:
service: cncb-bff-graphql-crudprovider: name: aws runtime: nodejs8.10 iamRoleStatements: ...functions: graphql: handler: handler.graphql events: - http: path: graphql method: post cors: true environment: TABLE_NAME: Ref: Table graphiql: handler: handler.graphiql ... trigger: handler: handler.trigger events: - stream: type: dynamodb ...resources: Resources: Table: Type: AWS::DynamoDB::Table ...