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
feita há um mês104 visualizações
1 Resposta
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
ESPECIALISTA
respondido há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas