AWS SES binding spec

Detailed documentation on the AWS SES binding component

Component format

To setup AWS binding create a component of type bindings.aws.ses. See this guide on how to create and apply a binding configuration.

See Authenticating to AWS for information about authentication-related attributes

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: ses
  5. spec:
  6. type: bindings.aws.ses
  7. version: v1
  8. metadata:
  9. - name: accessKey
  10. value: *****************
  11. - name: secretKey
  12. value: *****************
  13. - name: region
  14. value: "eu-west-1"
  15. - name: sessionToken
  16. value: mysession
  17. - name: emailFrom
  18. value: "sender@example.com"
  19. - name: emailTo
  20. value: "receiver@example.com"
  21. - name: emailCc
  22. value: "cc@example.com"
  23. - name: emailBcc
  24. value: "bcc@example.com"
  25. - name: subject
  26. value: "subject"

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Spec metadata fields

FieldRequiredBinding supportDetailsExample
regionYOutputThe specific AWS region“eu-west-1”
accessKeyYOutputThe AWS Access Key to access this resource“key”
secretKeyYOutputThe AWS Secret Access Key to access this resource“secretAccessKey”
sessionTokenNOutputThe AWS session token to use“sessionToken”
emailFromNOutputIf set, this specifies the email address of the sender. See also“me@example.com”
emailToNOutputIf set, this specifies the email address of the receiver. See also“me@example.com”
emailCcNOutputIf set, this specifies the email address to CC in. See also“me@example.com”
emailBccNOutputIf set, this specifies email address to BCC in. See also“me@example.com”
subjectNOutputIf set, this specifies the subject of the email message. See also“subject of mail”

Important

When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you’re using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you must not provide AWS access-key, secret-key, and tokens in the definition of the component spec you’re using.

Binding support

This component supports output binding with the following operations:

  • create

Example request

You can specify any of the following optional metadata properties with each request:

  • emailFrom
  • emailTo
  • emailCc
  • emailBcc
  • subject

When sending an email, the metadata in the configuration and in the request is combined. The combined set of metadata must contain at least the emailFrom, emailTo, emailCc, emailBcc and subject fields.

The emailTo, emailCc and emailBcc fields can contain multiple email addresses separated by a semicolon.

Example:

  1. {
  2. "operation": "create",
  3. "metadata": {
  4. "emailTo": "dapr-smtp-binding@example.net",
  5. "emailCc": "cc1@example.net",
  6. "subject": "Email subject"
  7. },
  8. "data": "Testing Dapr SMTP Binding"
  9. }

The emailTo, emailCc and emailBcc fields can contain multiple email addresses separated by a semicolon.

Last modified July 27, 2022: Remove namespace element from component examples (#2647) (ff9de5c8)