See here: AWS Documentation
The connection timeout is the amount of time (in milliseconds) that the HTTP connection will wait to establish a connection before giving up. The default is 50,000 ms. To set this value yourself, use the ClientConfiguration.setConnectionTimeout method.
I am trying to set the value myself, using:
ClientConfiguration configuration = new ClientConfiguration();
configuration.setConnectionTimeout(1900000);
configuration.setSocketTimeout(1900000);
Problem is, I am trying to update this value FROM WITHIN an AWS Lambda Java function. If I am calling an external lambda function, I can configure this before I make the call. This is what all of the documentation is showing examples of.
Is there a way I can add an environment variable or programmatically update the current AWS Lambda Java function connection and socket timeout from within itself?
Further clarification:
There is not a "client" invoking this lambda function. It is intended to be scheduled on the hour, triggered by the event type "CloudWatch Events - Schedule." The lambda itself places a request for one GET call that can take anywhere from 65 seconds to 140 seconds to run. The overall lambda time is currently extended to 5 minutes. The lambda's GET call fails right at the 50 second mark. The provided AWS documentation above references a default 50 second limit, with 3 retry attempts, both of which supposedly can be modified. However, I have been unable to modify the connection or socket timeout programmatically from the lambda's own code, or any parameter on the lambda itself. There has to be a way to configure this properly.
To an external service, over HTTPS. I fed it proxy settings and I verified the connection was correct and that it was the right call. In Postman, it takes 65+ seconds for any input or limit.
Please advise.


GETrequest to an AWS service, or to an external service?