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
질문됨 한 달 전104회 조회
1개 답변
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
전문가
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인