cfn/ddos-fire-extinguisher.yaml [1171:1193]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          def cfnrespond(event, context, responseStatus, responseData, physicalResourceId=None, noEcho=False):
            responseUrl = event['ResponseURL']
            responseBody = {}
            responseBody['Status'] = responseStatus
            responseBody['Reason'] = 'See the details in CloudWatch Log Stream: ' + context.log_stream_name
            responseBody['PhysicalResourceId'] = physicalResourceId or context.log_stream_name
            responseBody['StackId'] = event['StackId']
            responseBody['RequestId'] = event['RequestId']
            responseBody['LogicalResourceId'] = event['LogicalResourceId']
            responseBody['NoEcho'] = noEcho
            responseBody['Data'] = responseData
            json_responseBody = json.dumps(responseBody)
            print("Response body:\n" + json_responseBody)
            headers = {
                'content-type' : '',
                'content-length' : str(len(json_responseBody))
            }
            try:
                response = http.request('PUT',responseUrl,body=json_responseBody.encode('utf-8'),headers=headers)
                print("Status code: " + response.reason)
            except Exception as e:
                print("send(..) failed executing requests.put(..): " + str(e))
          def lambda_handler(event, context):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cfn/ddos-fire-extinguisher.yaml [2297:2319]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  def cfnrespond(event, context, responseStatus, responseData, physicalResourceId=None, noEcho=False):
                      responseUrl = event['ResponseURL']
                      responseBody = {}
                      responseBody['Status'] = responseStatus
                      responseBody['Reason'] = 'See the details in CloudWatch Log Stream: ' + context.log_stream_name
                      responseBody['PhysicalResourceId'] = physicalResourceId or context.log_stream_name
                      responseBody['StackId'] = event['StackId']
                      responseBody['RequestId'] = event['RequestId']
                      responseBody['LogicalResourceId'] = event['LogicalResourceId']
                      responseBody['NoEcho'] = noEcho
                      responseBody['Data'] = responseData
                      json_responseBody = json.dumps(responseBody)
                      print("Response body:\n" + json_responseBody)
                      headers = {
                        'content-type' : '',
                        'content-length' : str(len(json_responseBody))
                      }
                      try:
                          response = http.request('PUT',responseUrl,body=json_responseBody.encode('utf-8'),headers=headers)
                          print("Status code: " + response.reason)
                      except Exception as e:
                          print("send(..) failed executing requests.put(..): " + str(e))
                  def lambda_handler(event, context):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



