I am running some code in AWS Lambda that dynamically creates SageMaker models. I am locking Sagemaker's API version like so:
const sagemaker = new AWS.SageMaker({apiVersion: '2017-07-24'});
And here's the code to create the model:
await sagemaker.createModel({
ExecutionRoleArn: 'xxxxxx',
ModelName: sageMakerConfigId,
Containers: [{
Image: ecrUrl
}]
}).promise()
This code runs just fine locally with aws-sdk
on 2.418.0
.
However, when this code is deployed to Lambda, it doesn't work due to some validation errors upon creating the model:
- MissingRequiredParameter: Missing required key 'PrimaryContainer' in params
- UnexpectedParameter: Unexpected key 'Containers' found in params
Is anyone aware of existing bugs in the aws-sdk
for NodeJS using the SDK provided by AWS in the Lambda context? I believe the SDK available inside AWS Lambda is more up-to-date than 2.418.0
but apparently there are compatibility issues.