Maintained with ☕️ by
IcePanel logo

Update content of inbound and outbound emails using AWS Lambda in Amazon WorkMail

Share

Services

Today, Amazon WorkMail announced that you can now update content of in-transit emails to and from your organization with AWS Lambda functions when using Email Flow Rules. With this, you can easily update the contents of the email as it flows in and out of your organization in order to help meet security, compliance, or productivity needs. For example, you can create a Lambda function which removes all attachments, or adds disclaimers or signatures on the email before it is delivered. To get started quickly, you can deploy [the WorkMail Hello World Lambda function](https://console.aws.amazon.com/lambda/home#/create/app?applicationId=arn:aws:serverlessrepo:us-east-1:489970191081:applications/workmail-hello-world-python) from the AWS Serverless Application Repository to your account. A Lambda function with all the required resources and permissions will be created and configured on your behalf. Alternatively, you can create a Lambda function with all the required resources and permission manually. From this Lambda function you can call the PutRawMessageContent API of Amazon WorkMail Message Flow SDK to update messages in-transit. Finally, from the WorkMail console, create an [inbound or outbound email flow rule](https://docs.aws.amazon.com/workmail/latest/adminguide/lambda.html#synchronous-rules) with synchronous Run Lambda action that uses this Lambda function. To learn more, see [Updating message content with AWS Lambda](https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html). To learn more about Amazon WorkMail, or to start your trial, see [Amazon WorkMail.](/workmail/)