-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
22 lines (20 loc) · 725 Bytes
/
main.py
File metadata and controls
22 lines (20 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import json
import cfnresponse
def lambda_handler(event, context):
try:
print(json.dumps(event))
cfnresponse.send(event, context, cfnresponse.SUCCESS, {}, "CustomResourcePhysicalID")
except Exception as e:
print(e)
cfnresponse.send(event, context, cfnresponse.FAILED, {}, "CustomResourcePhysicalID")
# 物理IDを変化させる場合
'''
def lambda_handler(event, context):
try:
print(json.dumps(event))
physical_id = event["ResourceProperties"]["Greeting"]
cfnresponse.send(event, context, cfnresponse.SUCCESS, {}, physical_id)
except Exception as e:
print(e)
cfnresponse.send(event, context, cfnresponse.FAILED, {}, physical_id)
'''