Skip to content

Commit

Permalink
chore: migrate AWS SDK for JavaScript v2 APIs to v3 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Nov 13, 2023
1 parent 9543f79 commit 7e0f9a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-sdk/client-cloudwatch-logs": "^3.347.0",
"@aws-cdk/integ-runner": "^2.77.0-alpha.0",
"@aws-cdk/integ-tests-alpha": "^2.77.0-alpha.0",
"@ryansonshine/commitizen": "^4.2.8",
"@ryansonshine/cz-conventional-changelog": "^3.3.4",
"@semantic-release/exec": "^6.0.3",
"@types/jest": "^29.2.4",
"@types/node": "^18.11.15",
"aws-sdk": "^2.1282.0",
"constructs": "^10.0.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"husky": "^6.0.0",
Expand All @@ -59,11 +59,6 @@
"dependencies": {
"aws-cdk-lib": "^2.77.0"
},
"overrides": {
"aws-sdk": {
"xml2js": "^0.4.23"
}
},
"config": {
"commitizen": {
"path": "./node_modules/@ryansonshine/cz-conventional-changelog"
Expand Down
8 changes: 5 additions & 3 deletions scripts/cleanup.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const { CloudWatchLogs } = require('aws-sdk');
const { CloudWatchLogs } = require("@aws-sdk/client-cloudwatch-logs");
module.exports = (...regions) => {
regions.forEach(region => {
const logs = new CloudWatchLogs({
region,
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
},
});
logs.describeLogGroups({}, (err, data) => {
if (err) console.error(err);
Expand Down

0 comments on commit 7e0f9a8

Please sign in to comment.