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!

preguntada hace 3 años306 visualizaciones
1 Respuesta
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
respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas