Description
Describe the Feature
Implement a way to initialize a TLS handshake with an AWS service before having to call a specific service API.
Is your Feature Request related to a problem?
Forming a TLS connection is relatively slow. This is more of an issue with AWS Lambda where execution environments are terminated and re-started with general usage.
Proposed Solution
Implement a method to establish a TLS connection to a service (DynamoDB for example) without calling an API method. During the init phase Lambda has access to more of the host CPU, this period could be used to expedite the handshake process.
public class App implements RequestHandler<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> {
// for example initialize DDB client and eagerly open a TLS handshake.
public APIGatewayProxyResponseEvent handleRequest(APIGatewayProxyRequestEvent input, Context context) {
// use the DDB client
Describe alternatives you've considered
In Stefano's 2019 re:Invent talk he spoke about making a dummy read call to DynamoDB in order to have this effect. Having SDK support would mean it could be more cost effective and still effectively reduce handler latency.
Additional Context
Latency is everything, reducing it where possible is very important to all users of AWS Lambda.
- [?] I may be able to implement this feature request
I'd certainly be happy to help.
Your Environment
- AWS Java SDK version used: n/a
- JDK version used: n/a
- Operating System and version: n/a