Skip to content

Commit

Permalink
chore: manual cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored and macneale4 committed Nov 29, 2023
1 parent efd08ab commit beee304
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/actions/ses-email-action/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const core = require('@actions/core');
const aws = require('aws-sdk');

const {
SES
} = require("@aws-sdk/client-ses");
const { SES } = require("@aws-sdk/client-ses");

const fs = require('fs');

Expand Down Expand Up @@ -31,12 +27,6 @@ const templated = {
body,
};

// Set the region
// JS SDK v3 does not support global configuration.
// Codemod has attempted to pass values to each service client in this file.
// You may need to update clients outside of this file, if they use global config.
aws.config.update({ region });

// Create sendEmail params
const params = {
Destination: { /* required */
Expand All @@ -52,15 +42,7 @@ const params = {
console.log(params)

// Create the promise and SES service object
// const sendPromise = new aws.SES({apiVersion: '2010-12-01'}).sendEmail(params).promise();
const sendPromise = new SES({
// The transformation for apiVersion is not implemented.
// Refer to UPGRADING.md on aws-sdk-js-v3 for changes needed.
// Please create/upvote feature request on aws-sdk-js-codemod for apiVersion.
apiVersion: '2010-12-01',

region
}).sendTemplatedEmail(params).promise();
const sendPromise = new SES({region}).sendTemplatedEmail(params);

// Handle promise's fulfilled/rejected states
sendPromise
Expand Down

0 comments on commit beee304

Please sign in to comment.