Closed
Description
Hello, is it normal that a simple code to get a simple SSM parameter takes over 10 seconds?
@Override
public String handleRequest(Object o, Context context) {
LambdaLogger logger = context.getLogger();
Instant start = Instant.now();
SSMProvider ssmProvider = ParamManager.getSsmProvider();
String ssmParameter = ssmProvider.withDecryption().get("test-parameter");
logger.log("ssm parameter: " + ssmParameter);
Instant finish = Instant.now();
logger.log("Total duration SSM: " + Duration.between(start, finish).toMillis());
return ssmParameter;
}
Similar code to pull a parameter from SSM takes less than a second in other languages using AWS SDK, for instance, NodeJs.
Is this a normal java behavior?
Notes:
- This issue is not related to the withDecryption() functionality, even without it the code takes the same amount of time.
- This is not related to Java cold start (using Lambda), a simple "Hello World" application takes less than a second to execute.