If an API Gateway is created in functions/events, can it be referenced in the resources section?

aws

#1

If an API Gateway is created in functions/events, can it be referenced in the resources section?


#2

Yes. See Serverless Resources Docs for details on how the naming conventions work.

For example:

functions:
  hello:
    handler: my.handler

# would be referenced in the Resources section with:
Ref: HelloLambdaFunction

Hope it helps.


#4

Got it, I see what you mean, thanks