0
0

More than 1 year has passed since last update.

AWS Lambdaで、クエリーパラメータから値を取得する

Posted at

クエリーパラメータから値を取得する

Lambda関数に、以下のコードを追加します。

let {lang, ...info} = event.queryStringParameters;
console.log(lang, info);

WebStormを使って、ローカル環境で実行する

「Edit Configurations...」をクリックします。
スクリーンショット 2021-12-30 7.25.33.png

「API Gateway AWS Proxy」をクリックします。
スクリーンショット 2021-12-30 7.26.41.png

「queryStringParamters」に、langやその他の値を追加します。
スクリーンショット 2021-12-31 5.53.29.png

Lambda関数を実行します。
クエリーパラメーターから取得した値が出力されました。
スクリーンショット 2021-12-31 5.55.17.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