code: func (info *LambdaAWSInfo) RequireCustomResource(roleNameOrIAMRoleDefinition interface{},
  	handlerSymbol interface{},
  	lambdaOptions *LambdaFunctionOptions,
  	resourceProps map[string]interface{}) (string, error) {
  	if nil == handlerSymbol {
  		return "", fmt.Errorf("RequireCustomResource userFunc must not be nil")
  	}
  	// Is it valid?
  	// Get the function pointer for this...
  	handlerType := reflect.TypeOf(handlerSymbol)
  	if handlerType.Kind() != reflect.Func {
  		return "", fmt.Errorf("CustomResourceHandler kind %s is not %s",
  			handlerType.Kind(),
  			reflect.Func)
  	}
  
  	if nil == lambdaOptions {
  		lambdaOptions = defaultLambdaFunctionOptions()
  	}
  	funcPtr := runtime.FuncForPC(reflect.ValueOf(handlerSymbol).Pointer())
  	resourceInfo := &customResourceInfo{
  		handlerSymbol:    handlerSymbol,
  		userFunctionName: funcPtr.Name(),
  		options:          lambdaOptions,
  		properties:       resourceProps,
  	}
  	switch v := roleNameOrIAMRoleDefinition.(type) {
  	case string:
  		resourceInfo.roleName = roleNameOrIAMRoleDefinition.(string)
  	case IAMRoleDefinition:
  		definition := roleNameOrIAMRoleDefinition.(IAMRoleDefinition)
  		resourceInfo.roleDefinition = &definition
  	default:
  		panic(fmt.Sprintf("Unsupported IAM Role type: %s", v))
  	}
  	resourceInfo.options.Environment = make(map[string]*gocf.StringExpr)
  	info.customResources = append(info.customResources, resourceInfo)
  	info.DependsOn = append(info.DependsOn, resourceInfo.logicalName())
  	return resourceInfo.logicalName(), nil
  }
docs: // RequireCustomResource adds a Lambda-backed CustomResource entry to the CloudFormation
  // template. This function will be made a dependency of the owning Lambda function.
  // The returned string is the custom resource's CloudFormation logical resource
  // name that can be used for `Fn:GetAtt` calls for metadata lookups