Cannot update canary using ‘aws-sdk’

Hi all,
I’m trying to update canary to the most recent ‘.zip’ archive from S3 bucket with code(using sdk):
let synthetics = new AWS.Synthetics();
let params = {
Name: “canary-name”,
Code: {
Handler: ‘canary.handler’,
S3Bucket: ‘bucket-name’,
S3Key: ‘bucket-key’,
S3Version: “version-id”
}
};
let response = await synthetics.updateCanary(params).promise();
After invocation, response is empty object({}), no errors occured
I use S3 bucket, because ‘.zip’ archive contains some additional node libraries
Also how could I set up the flow of updating code in repo and automatically update canary?
As for now I guess, I just can create canary single time and have no way to continuously update canary code
Thanks to all for any comments!

Read more here: Source link