code: public <T> boolean send(@Nonnull final CfnRequest<?> event, @Nonnull final Status status, @Nonnull final Context context,
                              @Nullable final String reason, @Nullable final T data, @Nullable final String physicalResourceId,
                              final boolean noEcho) {
          // Sanitize inputs
          checkNotNull(event, "event");
          checkNotNull(status, "status");
          checkNotNull(context, "context");
  
          // Compose response
          final CfnResponse<T> response = new CfnResponse<>();
          response.setData(data);
          response.setStatus(status);
          response.setLogicalResourceId(event.getLogicalResourceId());
          response.setPhysicalResourceId(physicalResourceId == null ? context.getLogStreamName() : physicalResourceId);
          response.setReason(reason == null ? "See the details in CloudWatch Log Stream: " + context.getLogStreamName() : reason);
          response.setRequestId(event.getRequestId());
          response.setStackId(event.getStackId());
          response.setNoEcho(noEcho);
  
          // Send response
          final HttpPut put = new HttpPut(event.getResponseURL());
          try {
              final String body = mapper.writeValueAsString(response);
              LOGGER.info(body);
              put.setEntity(new StringEntity(body));
              put.setHeader("Content-Type", "");
              httpClient.execute(put, new BasicResponseHandler());
          } catch (final IOException e) {
              LOGGER.error("Could not send response to " + event.getResponseURL(), e);
              return false;
          }
          return true;
      }
docs: Synchronously sends response to Cloudformation S3 endpoint
  
  @param event              cloudformation event
  @param status             SUCCESS or FAILURE
  @param context            AWS lambda context
  @param reason             custom reason to report to cfn (optional)
  @param data               user data return object (optional)
  @param physicalResourceId custom physical resource ID (optional)
  @param noEcho             Indicates whether to mask the output of the custom resource when retrieved by using the Fn::GetAtt function (optional)
  @param <T>                type of custom user data to send in response
  @return true if success, false if there was an error (check logs)