Skip to content

ApiGatewayV2 ResponseParameters inconsistency #1113

@nnew2

Description

@nnew2

Hello,

The following fails to deploy with error: Properties validation failed for resource CoolIntegration with message: [#/ResponseParameters/200: extraneous key [remove:header.x-powered-by] is not permitted]

However, creating the ResponseParameters from AWS Console works. Note that the RequestParameters can be created using CloudFormation just fine.

JSON of successful ResponseParameter when created in the AWS Console

$ aws apigatewayv2 get-integration   --api-id xxxxx   --integration-id xxxxx   --region eu-central-1   --output json --profile xxxx
{
    "ConnectionId": "xxxxx",
    "ConnectionType": "VPC_LINK",
    "Description": "API Gateway Integration",
    "IntegrationId": "xxxxx",
    "IntegrationMethod": "ANY",
    "IntegrationType": "HTTP_PROXY",
    "IntegrationUri": "xxxxx",
    "PayloadFormatVersion": "1.0",
    "RequestParameters": {
        "append:header.X-Service": "CoolService"
    },
    "ResponseParameters": {
        "200": {
            "remove:header.x-powered-by": "''"
        }
    },
    "TimeoutInMillis": 30000
}

Failing YAML

CoolIntegration:
  Type: AWS::ApiGatewayV2::Integration
  Properties:
    Description: API Gateway Integration
    ApiId: !ImportValue x:y
    ConnectionType: VPC_LINK
    ConnectionId: !ImportValue x:y
    IntegrationType: HTTP_PROXY
    IntegrationMethod: ANY
    IntegrationUri: !ImportValue x:y
    PayloadFormatVersion: "1.0"
    RequestParameters:
      "append:header.X-Service": "CoolService"
    ResponseParameters:
      "200":
        remove:header.x-powered-by: "''"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions