From b203323870fe0c7b756486f864e7d2a52563b0c7 Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Mon, 6 Nov 2023 05:09:34 +0000 Subject: [PATCH] chore: run codemod on tools/**/*.js chore: format --- tools/asset-monitor/cloudwatch.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/asset-monitor/cloudwatch.js b/tools/asset-monitor/cloudwatch.js index 97607ac56efa..e2ace02fb0c5 100644 --- a/tools/asset-monitor/cloudwatch.js +++ b/tools/asset-monitor/cloudwatch.js @@ -1,5 +1,5 @@ const fs = require('fs'); -const AWS = require('aws-sdk'); +const { CloudWatch } = require('@aws-sdk/client-cloudwatch'); let cloudwatch; @@ -19,17 +19,17 @@ module.exports.configure = filename => ); } - AWS.config.update({ - region: 'eu-west-1', - accessKeyId: module.exports.getProperty('aws.access.key', data), - secretAccessKey: module.exports.getProperty( - 'aws.access.secret.key', - data - ), - }); - try { - cloudwatch = new AWS.CloudWatch(); + cloudwatch = new CloudWatch({ + region: 'eu-west-1', + credentials: { + accessKeyId: module.exports.getProperty('aws.access.key', data), + secretAccessKey: module.exports.getProperty( + 'aws.access.secret.key', + data + ), + }, + }); return resolve({}); } catch (e) { return reject(e);