LoginSignup
1
1

More than 1 year has passed since last update.

Lambda(Python)のテストイベントを作成するために、関数の先頭に入れる1行

Posted at

はじめに

「API Gateway→Lambda」などのLambdaを書くときに、最初にlambda_handlerのeventに渡ってくるデータを取得したい場合のワンライン、コピペ用メモです。

Lambda

    print(json.dumps(event, ensure_ascii=False))

まず、この1行を入れて、APIを送信するなどして、Lambdaを動かします。
eventの内容をCloudWatchLogsから取得して、テストのイベントJSONに使います。
image.png

おわりに

小技として記事にしてみました。

1
1
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
1
1