AWS Cloudformation Resource Method. No match for output mapping and no default output mapping configured.

0

Hello Please I need help i hget the following after deploying my API Gateway stack

Response when testing with Mock

{"message": "Internal server error"}

No match for output mapping and no default output mapping configured. Endpoint Response Status Code: 200
Sat Aug 19 05:33:52 UTC 2023 : Method completed with status: 500

I deployed my Gateway Resource Method using Cloud Formation.

  AuthPOSTMethod:
    Type: AWS::ApiGateway::Method
    DeletionPolicy: Delete
    Properties:
      AuthorizationType: NONE 
      HttpMethod: GET 
      ResourceId: !ImportValue ExAuthResources
      RestApiId: !ImportValue ExPortedAPI
        IntegrationHttpMethod: GET 
        Type: MOCK 
        RequestTemplates:
          application/json: '{"statusCode": 200}'
       RequestModels:
        application/json: 'Empty'
1개 답변
1
수락된 답변

The issue might be related to the setup of your CloudFormation template for the API Gateway resource method. Specifically, it seems that there might be a syntax issue with your AuthPOSTMethod resource. Here's how you can address the issue:

Check IntegrationHttpMethod: Ensure that the IntegrationHttpMethod property is properly aligned under the Properties section.

Indentation and Formatting: Double-check the indentation and formatting of your CloudFormation YAML. Proper indentation is crucial to ensure that properties are correctly associated with their respective resources.

Response Configuration: Verify your response configuration, including the output mappings, response templates, and response models.

Based on the code you provided, it appears there might be a minor formatting error with the IntegrationHttpMethod property. Here's a corrected version of your CloudFormation snippet:

AuthPOSTMethod:
  Type: AWS::ApiGateway::Method
  DeletionPolicy: Delete
  Properties:
    AuthorizationType: NONE 
    HttpMethod: GET 
    ResourceId: !ImportValue ExAuthResources
    RestApiId: !ImportValue ExPortedAPI
    Integration:
      IntegrationHttpMethod: GET
      Type: MOCK 
      RequestTemplates:
        application/json: '{"statusCode": 200}'
    RequestModels:
      application/json: 'Empty'

profile picture
전문가
답변함 10달 전
profile pictureAWS
전문가
검토됨 10달 전

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

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

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

관련 콘텐츠