Skip to content
📯 A serverless API for sending email and SMS messages powered by Amazon Web Services' Lambda
HCL Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
iam
LICENSE
README.md
terraform.tf
terraform.tfvars

README.md

postino

A serverless API for sending email and SMS messages powered by Amazon Web Services' Lambda

Deployment

  1. Install Terraform
  2. Populate the variables in terraform.tfvars
  3. Run terraform init && terraform apply (review the plan and answer yes)
  4. Go to the API Gateway console and create your first API key for the Postino usage plan (howto?)

Usage

Note: instructions for the curl(1) utility.

Sending an email message

curl \
	--request POST \
	--header "x-api-key: YOUR_POSTINO_API_KEY" \
	--header "notify-to: you@YOUR_DOMAIN" \
	--header "notify-subject: Postino API test message" \
	--data "This message was sent with the Postino API!" \
	https://postino.YOUR_DOMAIN/email

Sending a SMS message

curl \
	--request POST \
	--header "x-api-key: YOUR_POSTINO_API_KEY" \
	--header "notify-to: +00 123 456 789" \
	--data "This message was sent with the Postino API!" \
	https://postino.YOUR_DOMAIN/sms

Security

There's three gotchas for security reasons:

  • All resources require an API key in the Postino usage plan, provide it through the x-api-key request header
  • In the POST /email resource, all recipients must be pre-verified (howto?)
  • Requests are limited to 500/week and 1/second, modify these values by tweaking the Postino usage plan's rate limiting parameters (howto?)

License

See LICENSE.

You can’t perform that action at this time.