とりあえず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レスポンス用 -------------------------------------------------------------------...
=======================================
https://plus.google.com/106218564410864892476
January 31, 2018 at 10:05AM
=======================================
とりあえず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
------------------------------------------------------------------------
※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
コメント
コメントを投稿