AWS CDK Ses Smtp Credentials
Generate SES smtp credentials for a user and store the credentials in a SecretsManager Secret.
Install
TypeScript
npm install @pepperize/cdk-ses-smtp-credentials
or
yarn add @pepperize/cdk-ses-smtp-credentials
Python
pip install pepperize.cdk-ses-smtp-credentials
C# / .Net
dotnet add package Pepperize.CDK.SesSmtpCredentials
Java
<dependency>
<groupId>com.pepperize</groupId>
<artifactId>cdk-ses-smtp-credentials</artifactId>
<version>${cdkSesSmtpCredentials.version}</version>
</dependency>
Usage
npm install @pepperize/cdk-ses-smtp-credentials
See API.md.
Create AWS SES Smtp Credentials for a given user
Attaches an inline policy to the user allowing to send emails
import { User } from "@aws-cdk/aws-iam";
import { SesSmtpCredentials } from "@pepperize/cdk-ses-smtp-credentials";
const user = new User(stack, "SesUser", {
userName: "ses-user",
});
const smtpCredentials = new SesSmtpCredentials(this, "SmtpCredentials", {
user: user,
});
// smtpCredentials.secret contains json value {username: "<the generated access key id>", password: "<the calculated ses smtp password>"}
See API Reference - SesSmtpCredentials
Create AWS SES Smtp Credentials and create a new user
Attaches an inline policy to the user allowing to send emails
import { User } from "@aws-cdk/aws-iam";
import { SesSmtpCredentials } from "@pepperize/cdk-ses-smtp-credentials";
const smtpCredentials = new SesSmtpCredentials(this, "SmtpCredentials", {
userName: "ses-user",
});
// smtpCredentials.secret contains json value {username: "<the generated access key id>", password: "<the calculated ses smtp password>"}
See API Reference - SesSmtpCredentials
Calculate the AWS SES Smtp password on your own
import * as AWS from "aws-sdk";
import { calculateSesSmtpPassword } from "@pepperize/cdk-ses-smtp-credentials";
const iam = new AWS.IAM();
const accessKey = await iam
.createAccessKey({
UserName: username,
})
.promise();
const accessKeyId = accessKey.AccessKey.AccessKeyId;
const secretAccessKey = accessKey.AccessKey.SecretAccessKey;
const password = calculateSesSmtpPassword(secretAccessKey, "us-east-1");
console.log({
username: accessKeyId,
password: password,
});
See Obtaining Amazon SES SMTP credentials by converting existing AWS credentials
Metadata
Release files for pepperize.cdk-ses-smtp-credentials 0.3.902
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pepperize_cdk_ses_smtp_credentials-0.3.902.tar.gz | 1.8 MB | Without provenance | Details for pepperize_cdk_ses_smtp_credentials-0.3.902.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pepperize_cdk_ses_smtp_credentials-0.3.902-py3-none-any.whl | Python 3 | none | any | Details for pepperize_cdk_ses_smtp_credentials-0.3.902-py3-none-any.whl |
Total release size: 3.6 MB
Release files / pepperize_cdk_ses_smtp_credentials-0.3.902.tar.gz
| Download URL | pepperize_cdk_ses_smtp_credentials-0.3.902.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8d8b8978d6136cd8a6445a769faf89c0cc1a9b63fed96881a897fa718fbddb9
|
|
BLAKE2b-256 checksum How to use checksums |
38a39ebf9cd1ae141898f5706c64cced630977dec6a89070d71d73fd7cf920d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / pepperize_cdk_ses_smtp_credentials-0.3.902-py3-none-any.whl
| Download URL | pepperize_cdk_ses_smtp_credentials-0.3.902-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
510654a4e19268708ab12bc65db8de370ccb6995cece8a81bba6e746bf20afc1
|
|
BLAKE2b-256 checksum How to use checksums |
e0b49989a838bfcc9c0a475107ae1a8eaa2a1f994b5a6a2f054c34aa209ad03c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for pepperize.cdk-ses-smtp-credentials 0.3.902
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.