AWS::Serverless::Function RestApiId specifies the API Gateway ID that is not in this cloudformation

0
  1. We have set more than 500 resources (N lambdas and 1 API Gateway) in the cloudformation template yaml.
  2. Because there are more than 500 resources, you cannot use sam deploy to AWS
  3. We will split the resource into at least two templates and deploy them to separate cloudformation
  4. But I hope that the lambdas in these two cloudformations share the same API Gateway
  5. The actual practice is to set N lambdas and an API Gateway (testApi) in the first template yaml. The Events->getEndpoint->Properties->RestApiId of N lambdas: !Ref testApi
  6. Question, in the second lambda in template yaml, how to set RestApiId to point to testApi template
posta un mese fa104 visualizzazioni
1 Risposta
0

Hi JasonKao,

please refer to this walkthrough on how to create a cross-stack reference: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough-crossstackref.html which will allow you to reference the API Gateway resource from the first stack in the second one.

profile pictureAWS
ESPERTO
con risposta un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande