Class Handler


  • public class Handler
    extends Object
    CloudWatch Events request handler.

    Required environment variables:

    METRICS_NAMESPACE
    Namespace to use for CloudWatch metrics.

    Recommended memory: 256MB.

    • Field Detail

      • METRICS_NAMESPACE

        private static final String METRICS_NAMESPACE
        Metrics namespace to use.
      • objectMapper

        private com.fasterxml.jackson.databind.ObjectMapper objectMapper
        JSON handler.
    • Constructor Detail

      • Handler

        public Handler()
        Default constructor.
    • Method Detail

      • handle

        public void handle​(InputStream inputStream,
                           OutputStream outputStream)
                    throws IOException
        Handles invocation.
        Parameters:
        inputStream - Request input.
        outputStream - Output stream.
        Throws:
        IOException - When JSON loading/dumping fails.