The AWS SDK for JavaScript V3 API Reference Guide describes in detail all the API operations for the AWS SDK for JavaScript version 3 (V3).
Amazon SES examples using SDK for JavaScript (v3)
The following code examples show you how to perform actions and implement common scenarios by using the AWS SDK for JavaScript (v3) with Amazon SES.
Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
Scenarios are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services.
Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.
Actions
The following code example shows how to use CreateReceiptFilter
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { CreateReceiptFilterCommand, ReceiptFilterPolicy, } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; const createCreateReceiptFilterCommand = ({ policy, ipOrRange, name }) => { return new CreateReceiptFilterCommand({ Filter: { IpFilter: { Cidr: ipOrRange, // string, either a single IP address (10.0.0.1) or an IP address range in CIDR notation (10.0.0.1/24)). Policy: policy, // enum ReceiptFilterPolicy, email traffic from the filtered addressesOptions. }, /* The name of the IP address filter. Only ASCII letters, numbers, underscores, or dashes. Must be less than 64 characters and start and end with a letter or number. */ Name: name, }, }); }; const FILTER_NAME = getUniqueName("ReceiptFilter"); const run = async () => { const createReceiptFilterCommand = createCreateReceiptFilterCommand({ policy: ReceiptFilterPolicy.Allow, ipOrRange: "10.0.0.1", name: FILTER_NAME, }); try { return await sesClient.send(createReceiptFilterCommand); } catch (caught) { if (caught instanceof Error && caught.name === "MessageRejected") { /** @type { import('@aws-sdk/client-ses').MessageRejected} */ const messageRejectedError = caught; return messageRejectedError; } throw caught; } };
-
For API details, see CreateReceiptFilter in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use CreateReceiptRule
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { CreateReceiptRuleCommand, TlsPolicy } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; const RULE_SET_NAME = getUniqueName("RuleSetName"); const RULE_NAME = getUniqueName("RuleName"); const S3_BUCKET_NAME = getUniqueName("S3BucketName"); const createS3ReceiptRuleCommand = ({ bucketName, emailAddresses, name, ruleSet, }) => { return new CreateReceiptRuleCommand({ Rule: { Actions: [ { S3Action: { BucketName: bucketName, ObjectKeyPrefix: "email", }, }, ], Recipients: emailAddresses, Enabled: true, Name: name, ScanEnabled: false, TlsPolicy: TlsPolicy.Optional, }, RuleSetName: ruleSet, // Required }); }; const run = async () => { const s3ReceiptRuleCommand = createS3ReceiptRuleCommand({ bucketName: S3_BUCKET_NAME, emailAddresses: ["email@example.com"], name: RULE_NAME, ruleSet: RULE_SET_NAME, }); try { return await sesClient.send(s3ReceiptRuleCommand); } catch (err) { console.log("Failed to create S3 receipt rule.", err); throw err; } };
-
For API details, see CreateReceiptRule in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use CreateReceiptRuleSet
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { CreateReceiptRuleSetCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; const RULE_SET_NAME = getUniqueName("RuleSetName"); const createCreateReceiptRuleSetCommand = (ruleSetName) => { return new CreateReceiptRuleSetCommand({ RuleSetName: ruleSetName }); }; const run = async () => { const createReceiptRuleSetCommand = createCreateReceiptRuleSetCommand(RULE_SET_NAME); try { return await sesClient.send(createReceiptRuleSetCommand); } catch (err) { console.log("Failed to create receipt rule set", err); return err; } };
-
For API details, see CreateReceiptRuleSet in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use CreateTemplate
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { CreateTemplateCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; const TEMPLATE_NAME = getUniqueName("TestTemplateName"); const createCreateTemplateCommand = () => { return new CreateTemplateCommand({ /** * The template feature in Amazon SES is based on the Handlebars template system. */ Template: { /** * The name of an existing template in Amazon SES. */ TemplateName: TEMPLATE_NAME, HtmlPart: ` <h1>Hello, {{contact.firstName}}!</h1> <p> Did you know Amazon has a mascot named Peccy? </p> `, SubjectPart: "Amazon Tip", }, }); }; const run = async () => { const createTemplateCommand = createCreateTemplateCommand(); try { return await sesClient.send(createTemplateCommand); } catch (err) { console.log("Failed to create template.", err); return err; } };
-
For API details, see CreateTemplate in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use DeleteIdentity
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { DeleteIdentityCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; const IDENTITY_EMAIL = "fake@example.com"; const createDeleteIdentityCommand = (identityName) => { return new DeleteIdentityCommand({ Identity: identityName, }); }; const run = async () => { const deleteIdentityCommand = createDeleteIdentityCommand(IDENTITY_EMAIL); try { return await sesClient.send(deleteIdentityCommand); } catch (err) { console.log("Failed to delete identity.", err); return err; } };
-
For API details, see DeleteIdentity in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use DeleteReceiptFilter
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { DeleteReceiptFilterCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; const RECEIPT_FILTER_NAME = getUniqueName("ReceiptFilterName"); const createDeleteReceiptFilterCommand = (filterName) => { return new DeleteReceiptFilterCommand({ FilterName: filterName }); }; const run = async () => { const deleteReceiptFilterCommand = createDeleteReceiptFilterCommand(RECEIPT_FILTER_NAME); try { return await sesClient.send(deleteReceiptFilterCommand); } catch (err) { console.log("Error deleting receipt filter.", err); return err; } };
-
For API details, see DeleteReceiptFilter in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use DeleteReceiptRule
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { DeleteReceiptRuleCommand } from "@aws-sdk/client-ses"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; const RULE_NAME = getUniqueName("RuleName"); const RULE_SET_NAME = getUniqueName("RuleSetName"); const createDeleteReceiptRuleCommand = () => { return new DeleteReceiptRuleCommand({ RuleName: RULE_NAME, RuleSetName: RULE_SET_NAME, }); }; const run = async () => { const deleteReceiptRuleCommand = createDeleteReceiptRuleCommand(); try { return await sesClient.send(deleteReceiptRuleCommand); } catch (err) { console.log("Failed to delete receipt rule.", err); return err; } };
-
For API details, see DeleteReceiptRule in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use DeleteReceiptRuleSet
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { DeleteReceiptRuleSetCommand } from "@aws-sdk/client-ses"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; const RULE_SET_NAME = getUniqueName("RuleSetName"); const createDeleteReceiptRuleSetCommand = () => { return new DeleteReceiptRuleSetCommand({ RuleSetName: RULE_SET_NAME }); }; const run = async () => { const deleteReceiptRuleSetCommand = createDeleteReceiptRuleSetCommand(); try { return await sesClient.send(deleteReceiptRuleSetCommand); } catch (err) { console.log("Failed to delete receipt rule set.", err); return err; } };
-
For API details, see DeleteReceiptRuleSet in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use DeleteTemplate
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { DeleteTemplateCommand } from "@aws-sdk/client-ses"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; const TEMPLATE_NAME = getUniqueName("TemplateName"); const createDeleteTemplateCommand = (templateName) => new DeleteTemplateCommand({ TemplateName: templateName }); const run = async () => { const deleteTemplateCommand = createDeleteTemplateCommand(TEMPLATE_NAME); try { return await sesClient.send(deleteTemplateCommand); } catch (err) { console.log("Failed to delete template.", err); return err; } };
-
For API details, see DeleteTemplate in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use GetTemplate
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { GetTemplateCommand } from "@aws-sdk/client-ses"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; const TEMPLATE_NAME = getUniqueName("TemplateName"); const createGetTemplateCommand = (templateName) => new GetTemplateCommand({ TemplateName: templateName }); const run = async () => { const getTemplateCommand = createGetTemplateCommand(TEMPLATE_NAME); try { return await sesClient.send(getTemplateCommand); } catch (caught) { if (caught instanceof Error && caught.name === "MessageRejected") { /** @type { import('@aws-sdk/client-ses').MessageRejected} */ const messageRejectedError = caught; return messageRejectedError; } throw caught; } };
-
For API details, see GetTemplate in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use ListIdentities
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { ListIdentitiesCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; const createListIdentitiesCommand = () => new ListIdentitiesCommand({ IdentityType: "EmailAddress", MaxItems: 10 }); const run = async () => { const listIdentitiesCommand = createListIdentitiesCommand(); try { return await sesClient.send(listIdentitiesCommand); } catch (err) { console.log("Failed to list identities.", err); return err; } };
-
For API details, see ListIdentities in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use ListReceiptFilters
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { ListReceiptFiltersCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; const createListReceiptFiltersCommand = () => new ListReceiptFiltersCommand({}); const run = async () => { const listReceiptFiltersCommand = createListReceiptFiltersCommand(); return await sesClient.send(listReceiptFiltersCommand); };
-
For API details, see ListReceiptFilters in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use ListTemplates
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { ListTemplatesCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; const createListTemplatesCommand = (maxItems) => new ListTemplatesCommand({ MaxItems: maxItems }); const run = async () => { const listTemplatesCommand = createListTemplatesCommand(10); try { return await sesClient.send(listTemplatesCommand); } catch (err) { console.log("Failed to list templates.", err); return err; } };
-
For API details, see ListTemplates in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use SendBulkTemplatedEmail
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { SendBulkTemplatedEmailCommand } from "@aws-sdk/client-ses"; import { getUniqueName, postfix, } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; /** * Replace this with the name of an existing template. */ const TEMPLATE_NAME = getUniqueName("ReminderTemplate"); /** * Replace these with existing verified emails. */ const VERIFIED_EMAIL_1 = postfix(getUniqueName("Bilbo"), "@example.com"); const VERIFIED_EMAIL_2 = postfix(getUniqueName("Frodo"), "@example.com"); const USERS = [ { firstName: "Bilbo", emailAddress: VERIFIED_EMAIL_1 }, { firstName: "Frodo", emailAddress: VERIFIED_EMAIL_2 }, ]; /** * * @param { { emailAddress: string, firstName: string }[] } users * @param { string } templateName the name of an existing template in SES * @returns { SendBulkTemplatedEmailCommand } */ const createBulkReminderEmailCommand = (users, templateName) => { return new SendBulkTemplatedEmailCommand({ /** * Each 'Destination' uses a corresponding set of replacement data. We can map each user * to a 'Destination' and provide user specific replacement data to create personalized emails. * * Here's an example of how a template would be replaced with user data: * Template: <h1>Hello {{name}},</h1><p>Don't forget about the party gifts!</p> * Destination 1: <h1>Hello Bilbo,</h1><p>Don't forget about the party gifts!</p> * Destination 2: <h1>Hello Frodo,</h1><p>Don't forget about the party gifts!</p> */ Destinations: users.map((user) => ({ Destination: { ToAddresses: [user.emailAddress] }, ReplacementTemplateData: JSON.stringify({ name: user.firstName }), })), DefaultTemplateData: JSON.stringify({ name: "Shireling" }), Source: VERIFIED_EMAIL_1, Template: templateName, }); }; const run = async () => { const sendBulkTemplateEmailCommand = createBulkReminderEmailCommand( USERS, TEMPLATE_NAME, ); try { return await sesClient.send(sendBulkTemplateEmailCommand); } catch (caught) { if (caught instanceof Error && caught.name === "MessageRejected") { /** @type { import('@aws-sdk/client-ses').MessageRejected} */ const messageRejectedError = caught; return messageRejectedError; } throw caught; } };
-
For API details, see SendBulkTemplatedEmail in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use SendEmail
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { SendEmailCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; const createSendEmailCommand = (toAddress, fromAddress) => { return new SendEmailCommand({ Destination: { /* required */ CcAddresses: [ /* more items */ ], ToAddresses: [ toAddress, /* more To-email addresses */ ], }, Message: { /* required */ Body: { /* required */ Html: { Charset: "UTF-8", Data: "HTML_FORMAT_BODY", }, Text: { Charset: "UTF-8", Data: "TEXT_FORMAT_BODY", }, }, Subject: { Charset: "UTF-8", Data: "EMAIL_SUBJECT", }, }, Source: fromAddress, ReplyToAddresses: [ /* more items */ ], }); }; const run = async () => { const sendEmailCommand = createSendEmailCommand( "recipient@example.com", "sender@example.com", ); try { return await sesClient.send(sendEmailCommand); } catch (caught) { if (caught instanceof Error && caught.name === "MessageRejected") { /** @type { import('@aws-sdk/client-ses').MessageRejected} */ const messageRejectedError = caught; return messageRejectedError; } throw caught; } };
-
For API details, see SendEmail in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use SendRawEmail
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. Use nodemailer
to send an email with an attachment. import sesClientModule from "@aws-sdk/client-ses"; /** * nodemailer wraps the SES SDK and calls SendRawEmail. Use this for more advanced * functionality like adding attachments to your email. * * https://nodemailer.com/transports/ses/ */ import nodemailer from "nodemailer"; /** * @param {string} from An Amazon SES verified email address. * @param {*} to An Amazon SES verified email address. */ export const sendEmailWithAttachments = ( from = "from@example.com", to = "to@example.com", ) => { const ses = new sesClientModule.SESClient({}); const transporter = nodemailer.createTransport({ SES: { ses, aws: sesClientModule }, }); return new Promise((resolve, reject) => { transporter.sendMail( { from, to, subject: "Hello World", text: "Greetings from Amazon SES!", attachments: [{ content: "Hello World!", filename: "hello.txt" }], }, (err, info) => { if (err) { reject(err); } else { resolve(info); } }, ); }); };
-
For API details, see SendRawEmail in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use SendTemplatedEmail
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { SendTemplatedEmailCommand } from "@aws-sdk/client-ses"; import { getUniqueName, postfix, } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; /** * Replace this with the name of an existing template. */ const TEMPLATE_NAME = getUniqueName("ReminderTemplate"); /** * Replace these with existing verified emails. */ const VERIFIED_EMAIL = postfix(getUniqueName("Bilbo"), "@example.com"); const USER = { firstName: "Bilbo", emailAddress: VERIFIED_EMAIL }; /** * * @param { { emailAddress: string, firstName: string } } user * @param { string } templateName - The name of an existing template in Amazon SES. * @returns { SendTemplatedEmailCommand } */ const createReminderEmailCommand = (user, templateName) => { return new SendTemplatedEmailCommand({ /** * Here's an example of how a template would be replaced with user data: * Template: <h1>Hello {{contact.firstName}},</h1><p>Don't forget about the party gifts!</p> * Destination: <h1>Hello Bilbo,</h1><p>Don't forget about the party gifts!</p> */ Destination: { ToAddresses: [user.emailAddress] }, TemplateData: JSON.stringify({ contact: { firstName: user.firstName } }), Source: VERIFIED_EMAIL, Template: templateName, }); }; const run = async () => { const sendReminderEmailCommand = createReminderEmailCommand( USER, TEMPLATE_NAME, ); try { return await sesClient.send(sendReminderEmailCommand); } catch (caught) { if (caught instanceof Error && caught.name === "MessageRejected") { /** @type { import('@aws-sdk/client-ses').MessageRejected} */ const messageRejectedError = caught; return messageRejectedError; } throw caught; } };
-
For API details, see SendTemplatedEmail in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use UpdateTemplate
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { UpdateTemplateCommand } from "@aws-sdk/client-ses"; import { getUniqueName } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; const TEMPLATE_NAME = getUniqueName("TemplateName"); const HTML_PART = "<h1>Hello, World!</h1>"; const createUpdateTemplateCommand = () => { return new UpdateTemplateCommand({ Template: { TemplateName: TEMPLATE_NAME, HtmlPart: HTML_PART, SubjectPart: "Example", TextPart: "Updated template text.", }, }); }; const run = async () => { const updateTemplateCommand = createUpdateTemplateCommand(); try { return await sesClient.send(updateTemplateCommand); } catch (err) { console.log("Failed to update template.", err); return err; } };
-
For API details, see UpdateTemplate in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use VerifyDomainIdentity
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. import { VerifyDomainIdentityCommand } from "@aws-sdk/client-ses"; import { getUniqueName, postfix, } from "@aws-doc-sdk-examples/lib/utils/util-string.js"; import { sesClient } from "./libs/sesClient.js"; /** * You must have access to the domain's DNS settings to complete the * domain verification process. */ const DOMAIN_NAME = postfix(getUniqueName("Domain"), ".example.com"); const createVerifyDomainIdentityCommand = () => { return new VerifyDomainIdentityCommand({ Domain: DOMAIN_NAME }); }; const run = async () => { const VerifyDomainIdentityCommand = createVerifyDomainIdentityCommand(); try { return await sesClient.send(VerifyDomainIdentityCommand); } catch (err) { console.log("Failed to verify domain.", err); return err; } };
-
For API details, see VerifyDomainIdentity in AWS SDK for JavaScript API Reference.
-
The following code example shows how to use VerifyEmailIdentity
.
- SDK for JavaScript (v3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. // Import required AWS SDK clients and commands for Node.js import { VerifyEmailIdentityCommand } from "@aws-sdk/client-ses"; import { sesClient } from "./libs/sesClient.js"; const EMAIL_ADDRESS = "name@example.com"; const createVerifyEmailIdentityCommand = (emailAddress) => { return new VerifyEmailIdentityCommand({ EmailAddress: emailAddress }); }; const run = async () => { const verifyEmailIdentityCommand = createVerifyEmailIdentityCommand(EMAIL_ADDRESS); try { return await sesClient.send(verifyEmailIdentityCommand); } catch (err) { console.log("Failed to verify email identity.", err); return err; } };
-
For API details, see VerifyEmailIdentity in AWS SDK for JavaScript API Reference.
-
Scenarios
The following code example shows how to build an app that records, transcribes, and translates live audio in real-time, and emails the results.
- SDK for JavaScript (v3)
-
Shows how to use Amazon Transcribe to build an app that records, transcribes, and translates live audio in real-time, and emails the results using Amazon Simple Email Service (Amazon SES).
For complete source code and instructions on how to set up and run, see the full example on GitHub
. Services used in this example
Amazon Comprehend
Amazon SES
Amazon Transcribe
Amazon Translate
The following code example shows how to create a web application that tracks work items in an Amazon DynamoDB table and uses Amazon Simple Email Service (Amazon SES) to send reports.
- SDK for JavaScript (v3)
-
Shows how to use the Amazon DynamoDB API to create a dynamic web application that tracks DynamoDB work data.
For complete source code and instructions on how to set up and run, see the full example on GitHub
. Services used in this example
DynamoDB
Amazon SES
The following code example shows how to create a web application that tracks work items in an Amazon Aurora Serverless database and uses Amazon Simple Email Service (Amazon SES) to send reports.
- SDK for JavaScript (v3)
-
Shows how to use the AWS SDK for JavaScript (v3) to create a web application that tracks work items in an Amazon Aurora database and emails reports by using Amazon Simple Email Service (Amazon SES). This example uses a front end built with React.js to interact with an Express Node.js backend.
Integrate a React.js web application with AWS services.
List, add, and update items in an Aurora table.
Send an email report of filtered work items by using Amazon SES.
Deploy and manage example resources with the included AWS CloudFormation script.
For complete source code and instructions on how to set up and run, see the full example on GitHub
. Services used in this example
Aurora
Amazon RDS
Amazon RDS Data Service
Amazon SES
The following code example shows how to build an app that uses Amazon Rekognition to detect Personal Protective Equipment (PPE) in images.
- SDK for JavaScript (v3)
-
Shows how to use Amazon Rekognition with the AWS SDK for JavaScript to create an application to detect personal protective equipment (PPE) in images located in an Amazon Simple Storage Service (Amazon S3) bucket. The app saves the results to an Amazon DynamoDB table, and sends the admin an email notification with the results using Amazon Simple Email Service (Amazon SES).
Learn how to:
Create an unauthenticated user using Amazon Cognito.
Analyze images for PPE using Amazon Rekognition.
Verify an email address for Amazon SES.
Update a DynamoDB table with results.
Send an email notification using Amazon SES.
For complete source code and instructions on how to set up and run, see the full example on GitHub
. Services used in this example
DynamoDB
Amazon Rekognition
Amazon S3
Amazon SES
The following code example shows how to build an app that uses Amazon Rekognition to detect objects by category in images.
- SDK for JavaScript (v3)
-
Shows how to use Amazon Rekognition with the AWS SDK for JavaScript to create an app that uses Amazon Rekognition to identify objects by category in images located in an Amazon Simple Storage Service (Amazon S3) bucket. The app sends the admin an email notification with the results using Amazon Simple Email Service (Amazon SES).
Learn how to:
Create an unauthenticated user using Amazon Cognito.
Analyze images for objects using Amazon Rekognition.
Verify an email address for Amazon SES.
Send an email notification using Amazon SES.
For complete source code and instructions on how to set up and run, see the full example on GitHub
. Services used in this example
Amazon Rekognition
Amazon S3
Amazon SES