![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
template-mailer-aws-lambda
Advanced tools
A transactional email mailer that runs on AWS lambda and sends emails via SES
A transactional email mailer that runs on AWS Lambda and sends emails via AWS SES.
Create a role for the lambda function in IAM and attach these policies:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1459942470000",
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::template-mailer/*"
]
}
]
}
*Replace template-mailer
with your bucket name.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1475239732000",
"Effect": "Allow",
"Action": [
"ses:SendEmail",
"ses:SendRawEmail"
],
"Resource": [
"*"
]
}
]
}
Create the S3 bucket used by the mailer.
Copy config.json.dist
to config.json
and adapt to your needs.
Run
ROLE="…" make deploy
to publish the lambda function.
You can override the default function name with the environment variable FUNCTION_NAME
.
You might also be interested in setting these environment variables for the aws
CLI:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
Then setup an API Gateway Lamdba Proxy.
Create the template foo
:
curl -v -X PUT https://XXXX.execute-api.YYYY.amazonaws.com/production/templates/foo \
-H 'X-API-Key: ????' \
-H 'Content-Type: application/vnd.resourceful-humans.template-mailer-aws-lambda.v2+json; charset=utf-8' \
--data '{"subject":"Mail for <%= name %>","html":"Hello <%= name %>"}'
Create the transport bar
:
curl -v -X PUT https://XXXX.execute-api.YYYY.amazonaws.com/production/transport/bar \
-H 'X-API-Key: ????' \
-H 'Content-Type: application/vnd.resourceful-humans.template-mailer-aws-lambda.v2+json; charset=utf-8' \
--data '{"email":"info@example.com","name":"Example Inc."}'
Note: In order to use the email, you need to configure it in AWS SES.
Send an email using the transport bar
and the template foo
:
curl -v -X POST https://XXXX.execute-api.YYYY.amazonaws.com/production/send/bar/foo \
-H 'X-API-Key: ????' \
-H 'Content-Type: application/vnd.resourceful-humans.template-mailer-aws-lambda.v2+json; charset=utf-8' \
--data '{"to":"john.doe@example.com","name":"John Doe"}'
The subject
, html
and text
part of the template will be parsed through lodash's template function
with the data provided in the body
of this request.
You can provide the data with a formatter hint:
"subject": {
"@markdown": "This will be parsed with *markdown*"
}
it will parsed into
"subject": {
"@text": "This will be parsed with *markdown*", // the original value
"@html": "This will be parsed with <strong>markdown</strong>" // the HTML result
}
and can be access in the template accordingly.
FAQs
A transactional email mailer that runs on AWS lambda and sends emails via SES
The npm package template-mailer-aws-lambda receives a total of 6 weekly downloads. As such, template-mailer-aws-lambda popularity was classified as not popular.
We found that template-mailer-aws-lambda demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.