ApiGatewayV2 ResponseParameters inconsistency

オープン
#1,113 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws
領域
api, cloud

調査の方向性

リポジトリのファイルもテストも指定されていません。まず、失敗する YAML を使って AWS::ApiGatewayV2::Integration のデプロイを再現し、その後、ResponseParameters の検証を成功した AWS Console のペイロードと比較してください。remove:header.x-powered-by レスポンスパラメータが、コンソールと一貫して CloudFormation 経由で受け入れられれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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: "''"
主要言語
Python
スター
336
フォーク
173
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws-cloudformation/cloudformation-cli のほかの issue

aws-cloudformation/cloudformation-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。