LoginSignup
0
0

More than 1 year has passed since last update.

Lambda プロキシ統合の使用チェック時のInternal server error(502)

Last updated at Posted at 2021-11-22

はじめに

AWSのAPI Gatewayを使ってkintoneから指定のレコードを取得しようとした時に、「Lambda プロキシ統合の使用」にチェックを入れたらエラーになってしまったので書置きします。

2.png

こんなエラー
4.png

対応内容

チェック箇所1

index.js
exports.handler = (event, context, callback) => {

    var responseBody = {
        "key3": "value3",
        "key2": "value2",
        "key1": "value1"
    };

    // ↓ 要チェック
    var response = {
        "statusCode": 200,
        "headers": {
            "my_header": "my_value"
        },
        "body": JSON.stringify(responseBody),
        "isBase64Encoded": false
    };
    callback(null, response);
};

チェック箇所2
メソッドレスポンスのヘッダーや本文のチェック
6.png

参考

参考にさせていただき、ありがとうございます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0