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!

已提問 3 年前檢視次數 306 次
1 個回答
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
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南