とりあえずLambda用のテストコード ※jsonレスポンス用 ------------------------------------------------------------------------ import json def lambda_handler(event, context): try: print (json.dumps(event,indent=4)) user_object = { "Columun1" : "テスト", "Columun2" : "あいうえお", "Columun3" : "かきくけこ", "Columun4" : "aaaad", "Columun5" : "aaaae", "Columun6" : "aaaaf" } # return json return { 'statusCode' :200, 'headers' : {'content-type' : 'application/json'}, 'body': json.dumps(user_object) } except Exception as e: print(e) raise e ------------------------------------------------------------------------

とりあえずLambda用のテストコード ※jsonレスポンス用 -------------------------------------------------------------------...
=======================================
とりあえずLambda用のテストコード
※jsonレスポンス用

------------------------------------------------------------------------
import json

def lambda_handler(event, context):
try:
print (json.dumps(event,indent=4))
user_object = {
"Columun1" : "テスト",
"Columun2" : "あいうえお",
"Columun3" : "かきくけこ",
"Columun4" : "aaaad",
"Columun5" : "aaaae",
"Columun6" : "aaaaf"
}

# return json
return {
'statusCode' :200,
'headers' : {'content-type' : 'application/json'},
'body': json.dumps(user_object)
}
except Exception as e:
print(e)
raise e
------------------------------------------------------------------------

https://plus.google.com/106218564410864892476
January 31, 2018 at 10:05AM

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)