Synthetics: Get S3 bucket/key location at runtime

0

Is there a way in a CloudWatch Synthetics script (nodejs) to get the S3 bucket and key location for artifacts during runtime? I see log messages like:

S3 destination for uploading artifacts determined: 
{
    "s3Bucket": "cw-syn-results-accountid-region",
    "s3Key": "canary/region/name-uuid/2021/12/28/time"
}

Can I get that bucket and key for use in my script, even if it's unofficial and may break in future canary versions?

Scott
posta 2 anni fa312 visualizzazioni
1 Risposta
0

There is no currently supported way to do that.

If you need that information, this currently works (testing using syn-nodejs-puppeteer-3.3):

const uploader = require('SyntheticsUploader');

await uploader.setUpUploader();
const s3Path = 's3://' + uploader.getS3Path();

It is completely unsupported, though.

AWS
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande