Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
SagemakerRuntime.invokeEndpoint works fine locally but very slow on ElasticBeanstalk (Ec2) inside a private vpc running with docker.
Is the issue in the browser/Node.js?
Node.js
If on Node.js, are you running this on AWS Lambda?
No
Details of the browser/Node.js version
14
SDK version number
v2.726.0
To Reproduce (observed behavior)
import SageMakerRuntime from 'aws-sdk/clients/sagemakerruntime';
import requestBody from '../mock/smRequest.json';
(async () => {
const runtime = new SageMakerRuntime({ region: 'eu-central-1' });
const params = {
EndpointName: <ENDPOINT_NAME>,
Body: JSON.stringify(requestBody),
ContentType: 'application/json',
};
const runTimeResponse = await runtime.invokeEndpoint(params).promise();
console.log(runTimeResponse.Body.toString());
})();
this script when run locally responds in ~300ms, the same script when run within Elastic Beanstalk(EC2) in a VPC inside docker, the response time is 4-5 seconds.
Expected behavior
this script when run locally responds in ~300ms, the same script when run within Elastic Beanstalk in a VPC inside docker, the response time is 4-5 seconds.
Additional context
https://github.com/aws/aws-sdk-js/issues/3005 is a similar issue with other AWS service. Moving to the older version of AWS SDK (v2.574) fixed the problem. But I would very much like to run the latest version of aws-sdk.
Hey @azimiester Thank-you for reaching out to us with your issue, I understand your frustration and same like you I would like to use the latest version as well however, I have already reached out to the service team regarding the issue. While I would not be able to provide a time line but I would surely escalate the issue to have some more eyes from the service team on this.
Tagging this as duplicate, you can expect a reply soon from the team in the original issue.
Closing this now, issue will be tracked in #3005
@ajredniwja Thanks for replying.