Serverless.yml inheritance

Hi,

Lets start with the commend I’m pretty new to serverless, but really excited about the features it offers. However, I’m struggling creating a certain architecture, and really wondering if its even possible to create the architecture I like.

I’m building an API with AWS Lambda functions. I’m also using services like cognito and cloudsearch. For most of my lambda functions, the configuration is the same(runtime, memorySize, timeout, etc.). I would like to split my services, and reuse the configuration from the serverless.yml provider in the different services. My project structure would then look like this:

serverless.yml
| subservice
    subserverless.yml

My questions:

  1. In the above structure, is it possible to reference the entire provider key, as it is in serverless.yml, in my subserverless.yml? Including the API Gateway url?
  2. Is it possible to state functions only in subserverless.yml, and reference this file from within serverless.yml?

In the above structure, is it possible to reference the entire provider key, as it is in serverless.yml, in my subserverless.yml?

It’s technically possible but it’s a really bad idea so don’t do it.

Including the API Gateway url?

If you want to share one API Gateway between multiple services then read Serverless Framework - AWS Lambda Events - REST API (API Gateway v1)