3 $cH@s.ddlZddlZejZdZdZdddZdS)NSUCCESSFAILEDFc Cs|d}t|i}||d<d|j|d<|p2|j|d<|d|d<|d|d<|d|d<||d <||d <tj|}td |d tt|d } y*tjd||jd| d} td| j Wn2t k r} ztdt| WYdd} ~ XnXdS)NZ ResponseURLZStatusz*See the details in CloudWatch Log Stream: ZReasonZPhysicalResourceIdZStackIdZ RequestIdZLogicalResourceIdZNoEchoDatazResponse body: )z content-typezcontent-lengthPUTzutf-8)bodyheadersz Status code: z,send(..) failed executing requests.put(..): ) printZlog_stream_namejsondumpsstrlenhttprequestencodereason Exception) eventcontextZresponseStatusZ responseDataZphysicalResourceIdZnoEchoZ responseUrlZ responseBodyZjson_responseBodyrresponseer;/tmp/pip-target-ezim9f7s/lib/python/cfnresponse/__init__.pysend s(     r)NF)urllib3r PoolManagerrrrrrrrrs