Skip to content

Release 1.5

Compare
Choose a tag to compare

Release 1.5 adds support for the new proxy event format from Amazon API Gateway's HTTP API 🎉 and improves support for reactive/WebFlux applications as well as asynchronous initialization.

New features

  • New 0-parameter asynchronous initializer method for ContainerHandlerBuilder implementations that detects the actual JVM start time (#287)
SpringBootLambdaContainerHandler<AwsProxyRequest, AwsProxyResponse> handler =
        new SpringBootProxyHandlerBuilder<AwsProxyRequest>()
                    .defaultProxy()
                    .asyncInit()
                    .springBootApplication(SlowTestApplication.class)
                    .buildAndInitialize();
  • Experimental support for API Gateway's HTTP API new event format (version 2.0) 🎉. The new format is available through both the static constructors and the builder object (#329)
SpringBootLambdaContainerHandler<HttpApiV2ProxyRequest, AwsProxyResponse> httpApiHandler =
        SpringBootLambdaContainerHandler.getHttpApiV2ProxyHandler(WebFluxTestApplication.class)

// or 

SpringBootLambdaContainerHandler<HttpApiV2ProxyRequest, AwsProxyResponse> httpApiHandler =
        new SpringBootProxyHandlerBuilder<HttpApiV2ProxyRequest>()
                            .defaultHttpApiV2Proxy()
                            .initializationWrapper(new InitializationWrapper())
                            .springBootApplication(WebFluxTestApplication.class)
                            .buildAndInitialize();
  • New configuration parameter in the ContainerConfig object makes it easy to disable exception mapping. This allows exception to "bubble-up" all the way to the Lambda handler object for easy logging in CloudWatch metrics (#307)
LambdaContainerHandler.getContainerConfig().setDisableExceptionMapper(true);
  • Added a new parameter to the ContainerHandlerBuilder for Spring Boot 2 that makes it easy to start a Servlet-only application (#330)
SpringBootLambdaContainerHandler<AwsProxyRequest, AwsProxyResponse> handler =
        new SpringBootProxyHandlerBuilder<AwsProxyRequest>()
                                .defaultProxy()
                                .servletApplication()
                                .springBootApplication(ServletApplication.class)
                                .buildAndInitialize();
  • Official support for Spring 5.2.x and Spring Boot 2.2.x

Bug fixes

  • Fixed a race condition that caused the response buffer to be flushed early for WebFlux applications (#304)
  • Fixed server name logic when using the request headers and the HOST header is not present (#327)
  • Forced Servlet initialization at init time. When using Spring the DispatcherServlet was causing the first handler execution to be slow (#322)
  • Fixed a regression in content type encoding handling that was causing the container config value to be ignored (#317 - thank you @eranation!)

Other changes

  • Updated samples and archetypes to build and deploy out-of-the-box with the SAM CLI
  • Various dependency bumps
  • Generified the ServletRequestReader object to make it easy to implement new servlet-based readers in the future