I'm working on multiple functions that we will be using to manage images in an S3 bucket. I'm trying to figure out how to user serverless to deploy the various node.js scripts to lambda and thus far have figured that part out. But I would like to deploy them all as different paths under the same gateway API. I tried adding 'apiName' under the provider section, but it just creates a new GatewayAPI with the same name as the first.
Sample serverless.yml:
service: GetObjectInfo
frameworkVersion: ">=1.1.0"
custom:
region: us-east-2
provider:
name: aws
runtime: nodejs8.10
region: ${self:custom.region}
stage: ${opt:stage, 'dev'}
apiName: myGatewayAPI
memorySize: 256
timeout: 2
role: arn:aws:iam::118934906513:role/lambda-s3-role
functions:
GetObjectInfo:
name: GetObjectInfo
handler: index.handler
events:
- http:
path: /GetObjectInfo
method: POST
cors: true
environment:
REGION: ${self:custom.region}
package:
exclude:
- package-lock.json
- test/**
- .idea/**
- .git/**
- node_modules
What do I do in a second/third/nth to get them to deploy the gateway part into the same gateway interface? I prefer to keep the lambda code in separate project/git folders for maintenance purposes.