a eNa@s.ddlZddlZeZdZdZdddZdS)NSUCCESSFAILEDFc Cs|d}t|i}||d<d|j|d<|p2|j|d<|d|d<|d|d<|d|d<||d <||d <t|}td |d tt|d } z*tjd||d| d} td| j Wn4t y} ztdt| WYd} ~ n d} ~ 00dS)NZ ResponseURLZStatusz*See the details in CloudWatch Log Stream: ZReasonZPhysicalResourceIdZStackIdZ RequestIdZLogicalResourceIdZNoEchoZDatazResponse body: )z content-typezcontent-lengthPUTzutf-8)bodyheadersz Status code: z,send(..) failed executing requests.put(..): ) printZlog_stream_namejsondumpsstrlenhttprequestencodereason Exception) eventcontextZresponseStatusZ responseDataZphysicalResourceIdZnoEchoZ responseUrlZ responseBodyZjson_responseBodyrresponseero/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-16p9a37g/lib/python/cfnresponse/__init__.pysends*      r)NF)urllib3r PoolManagerr rrrrrrrs