Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ses-smtp-credentials-cdk

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ses-smtp-credentials-cdk

Create SMTP Credentials for use with SES

  • 3.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61
decreased by-71.09%
Maintainers
3
Weekly downloads
 
Created
Source

ses-smtp-credentials-cdk

npm version

Generate AWS SES SMTP credentials for sending mail via SES.

What

On the 10th January 2019 AWS changed how SES SMTP authentication works to restrict access on a per-region basis. This makes providing SES credentials annoyingly hard, if you are automating everything via Cloudformation.

This addresses that.

Usage

import { SesSmtpCredentials } from 'ses-smtp-credentials-cdk';

// ...

const smtpCredentials = new SesSmtpCredentials(this, 'Credentials', {
    region: 'eu-west-1'
});

new ssm.StringParameter(this, 'CredentialsParameter', {
    parameterName: 'email',
    stringValue: JSON.stringify({
        username: smtpCredentials.username(),
        password: smtpCredentials.password(),
    })
});

Implementation

  1. A user is created in IAM with only permissions for ses:SendRawEmail.
  2. The user is given an access key.
  3. The secret key is signed for the desired region (see below)
  4. the access key and signed secret key are returned as username and password

Signature algorithm

The algorithm for signing the key is as specified here:

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html

Nota Bene: Confidentiality of keys

The returned username and password are provided via Cloudformation (rather like the Iam::AccessKey resource), which is potentially a problem for confidentiality. Better would be for this custom resource to write directly to a secret. Patches are welcome.

Development

Releasing a new version

Run

$ npm version (patch|minor|major)
$ git push origin master [tag you just created]

FAQs

Package last updated on 14 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc