Cannot update canary using 'aws-sdk'

0

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!

asked 3 years ago287 views
1 Answer
0

I've already solved the issue. Maybe it'll be helpful for somebody

  1. When using aws-sdk - "S3Bucket" in params object need to be added without "s3://"
  2. Use getCanary() method to get canary object, which in my case contains validation errors
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions