Release 1.5.2 is a bug-fix release
Bug fixes
- Parametrized response writer to support HTTP API V2 proxy model that requires the single-value headers map to be populated (#377)
- Changed the base64 encoder for binary data in the response writer to the default encoder not the MIME encoder (#339)
Dependencies
- Bumped Spring version to 5.2.9 to address CVE (#380, thank you @jabhijeet!)
Assets
2
sapessi
released this
Release 1.5.1 is a bug-fix release
Bug fixes
Assets
2
sapessi
released this
Release 1.5 adds support for the new proxy event format from Amazon API Gateway's HTTP API
New features
- New 0-parameter asynchronous initializer method for
ContainerHandlerBuilderimplementations 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
ContainerConfigobject 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
ContainerHandlerBuilderfor 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
HOSTheader is not present (#327) - Forced Servlet initialization at
inittime. When using Spring theDispatcherServletwas 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
ServletRequestReaderobject to make it easy to implement new servlet-based readers in the future
Assets
2
sapessi
released this
Release 1.4 includes significant new features such as WebFlux support and asynchronous initialization as well as some minor bug fixes.
New features
- Support for Spring WebFlux applications in the new
aws-serverless-java-container-springboot2package (#239). - Asynchronous initialization makes it easy to take advantage of Lambda's boosted CPU access during the 10 seconds initialization period. The asynchronous initializer starts the underlying framework in a separate thread and uses as much of the 10 seconds timeout for initialization as possible. After 10 seconds, the initializer returns control to AWS Lambda and the main request handling method waits for the background initialization to complete before handling the next event. You can read more about asynchronous initialization in the documentation. This addresses #210, #234, and #264. To make asynchronous initialization more accessible, we have also added builder objects (#144) for the Spring-based implementations (the more likely to be slow at cold start):
public class StreamLambdaHandler implements RequestStreamHandler {
private SpringBootLambdaContainerHandler<AwsProxyRequest, AwsProxyResponse> handler;
public StreamLambdaHandler() throws ContainerInitializationException {
long startTime = Instant.now().toEpochMilli();
handler = new SpringBootProxyHandlerBuilder()
.defaultProxy()
.asyncInit(startTime)
.springBootApplication(SlowApplication.class)
.buildAndInitialize();
}
@Override
public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)
throws IOException {
handler.proxyStream(inputStream, outputStream, context);
}
}- More complete implementation of the
ServletContextwhich now allows servlet registration and can perform basic routing (#256) - Implementation of
AsyncContextfor theAwsHttpServletRequest. Note thestart(Runnable runnable)method will throw anUnsupportedOperationExceptionsince we don't want to encourage background tasks in the Lambda environment. - Added a new
setDefaultContentCharsetoption in theContainerConfigobject to override the HTTP-specs default ofISO-8859-1(#269)
Bug fixes
- Fixed an issue with
getParameterValues()inAwsProxyHttpServletRequestthat made the method return only the first available value for query string parameters (#280) - Fixed a bug in
JerseyServletResponseWriterthat caused exceptions not be progated from thefailure()method (#273, thank you @mikaelq for the fix) - Fixed a bug in the default log formatter for HTTP access logs that caused ALB requests to be logged as
01/01/1970:00:00:00Z(#270, thank you @goughy000 for the fix)
Other changes
- Updated dispatcher logic to store the
DispatcherTypein a request attribute. This allows Serverless Java Container's dispatcher to support any implementation/wrapping ofServletRequest(#275) - Changed Spring, Spring Boot, and Spring Boot 2 implementations to present themselves as embedded web servers instead of using Spring's internal functions to initialize the application context
- Split Spring Boot 2 support into a separate package to better take advantage of the new interfaces and features in Spring Boot 2
- Bump Jersey dependency to version
2.29.1(#266) - Bump Jackson version to
2.9.10
Assets
2
sapessi
released this
Release 1.3.2 is primarily a bug-fix release. However, it also includes some minor new features.
New features
- Exposed Jersey injection manager from the
JerseyLambdaContainerHandlerobject (#253). Thanks @dmetzler for the contribution!
JerseyLambdaContainerHandler handler =
JerseyLambdaContainerHandler.getAwsProxyHandler(jerseyApplication);
handler.getInjectionManager();Bug fixes
- Removed path validation in the
getMimetype()method of theAwsServletContextsince frameworks call this method with non-existent paths and their only objective is to get the mime type based on the file extensions, regardless of whether the file exists on disk or not (#254) - Added additional null-checks around the
AwsServletInputStreamas well as a check for theNullInputStreamtype (#147) - Graceful handling of empty header and query string values (#247)
- Added annotation to make sure requests get deserialized with the
isBase64Encodedfield for debugging purposes (#262) - Improved and simplified header parsing logic (#263)
- Fixed wrong value assignments in multipart forms (file name and field name were inverted) (#258)
Other changes
Assets
2
sapessi
released this
Patch release to address request validation issues introduced in the 1.3 release.
Assets
2
sapessi
released this
Release 1.3 includes a new features, improvements, and bug fixes.
New features
- Support for Application Load Balancer's (ALB) events - you can now use an AWS Lambda function built with
serverless-java-containeras a target for ALB.serverless-java-containerrequires that multi-value headers support is enabled in ALB. (#214) - Gradle and Maven Assembly support - all archetypes and samples are updated to use the maven assembly plugin by default to generate a
zipdeployment package for AWS Lambda. This improves cold start performance for large applications. We have also included abuild.gradlefile in both samples and archetypes that generates the same zip file. The generated SAM templates point to the assembly zip file by default. (#133) - Spring Boot 2.x support - we have added a new
aws-serverless-springboot2-archetypethat makes it easy to quickly set up a new project with Spring Boot 2.x. (#181, #193)
Bug fixes
- Fixed issue with Jersey not being sent all request headers. (#208)
- Fixed issue with
getParameterMap()method inHttpServletRequestnot supporting multi-value query string parameters. (#217 thank you, @superweijiafeng) - Fixed issue with headers being treated as case sensitive after deserialization (#216 thank you, @eirikjak)
Other changes
- It is now possible to inject
HttpServletRequestobjects in Jersey'sFilterobjects because the framework allows proxying of theServletRequest,ServletContext, andServletResponsesuppliers. (#211) - Updated documentation to make it easier to port existing Spring applications that rely on custom
@ControllerAdviceclasses. (#167)
Assets
2
sapessi
released this
New major release with bug fixes, new features, and Struts 2 support!
We received a lot of support from the community for this release - all contributors are mentioned next to the feature/issue they worked on. Thank you all!
New features
- Support for the Apache Struts framework including an archetype:
aws-serverless-struts2-archetype. Take a look at the quick start wiki. (#149 thank you, @jogep) - Support for API Gateway's multi-value headers and query string parameters. You can now receive arrays of values in the query string and return multiple cookies! (#198)
- Support for pre-registered binary content types so that the framework doesn't have to test the encoding of requests. You can now call the
addBinaryContentTypes(String... ct)method on theContainerConfigobject to ensure the specified content types are always treated as binary. By default, theContainerConfigobject registersapplication/octet-stream,image/jpeg,image/png, andimage/gifas binary (#191 thank you, @billrobertson42) - Override default charset when not specified in a request
Content-Type. By default, the HTTP specs assumeISO-8859-1as charset. You can now call thesetDefaultContentCharset()of theContainerConfigobject to override this (#175) - Updated version of all dependency framework to the latest version (#201):
- Jersey 2.26 -> 2.27
- Spark 2.7.2 -> 2.8.0 (thank you, @jschwartz73)
- Spring 5.0.7.RELEASE -> 5.1.1.RELEASE
- SpringBoot 1.5.9.RELEASE -> 1.5.17.RELEASE
Bug fixes
- Resolved NullPointerException when trying to access non-existent query string parameters in Spark (#168)
- Resolved NullPointerException when trying to access remote address and the event object does not contain the context or identity objects. System now defaults to
127.0.0.1if the value is not populated in the event (#182) - Fixed
setCharacterEncodingmethod in servlet response. It was erroneously setting theContent-Encodingheader. This has now been fixed to append the charset property to theContent-Typeheader (#188 thank you, @larmog) - Fixed encoding of request URI for Jersey implementation. The library generated the
ContainerRequestobject using thegetPathInfo()method from the servlet request, which contained decoded parameters. Changed this to use thegetRequestURI()method. (#200) - Resolved IllegalArgumentException when processing multipart forms. The exception was thrown by the file path security validation method when applied to the file name on the multi-part form. (#205 thank you, @tjordahl)
Other changes
- Moved archetypes to root of package to prevent build failures when calling maven package in specific archtype (#185 thank you, @norris-shelton)
- Removed need to close the output stream explicitly. The stream is now owned by the
proxyStreammethod (#183) - Added integration tests for archetypes and parameterized the dependency versions in the
pom.xmlto make sure we don't publish an archetype out of step again (#178) - Updated Jackson dependency version in all packages and samples to
2.9.7to addressCVE-2018-7489(#201)
Assets
2
sapessi
released this
Patch release:
- Addresses the null query string issue reported in #168
- Switched Spring and SpringBoot archetypes to use the
@Importannotation rather than@ComponentScan
Assets
2
sapessi
released this
Bug fix release to address an issue with Spring mapping List<String> from query string parameters reported in #162

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
