Custom Resources protocol requires a response. In this, Cloud Formation waits for a HTTPs Response and if it doesn’t have the necessary response it will eventually timeout. This can be done using cfn-response Module.

For Example:

ZipFile:

import cfnresponse  
import json
  def handler(event, context):
    responseValue = int(event['ResourceProperties']['Input']) * 5
    responseData = {}
    responseData['Data'] = responseValue
    cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData, "CustomResourcePhysicalID")

Need Help With Cloud Development?

Work with our skilled Cloud developers to accelerate your project and boost its performance.

Hire Cloud Developers

Support On Demand!

Related Q&A