Creating a configuration
Written by
Updated at July 22, 2024
Create a configuration to get email delivery notifications.
Management console
AWS CLI
-
In the management console
, select the folder containing the address. -
Select Cloud Postbox.
-
In the left-hand panel, select
Configurations. -
Click Create configuration.
-
Enter a name and (optionally) a description of the configuration.
-
Under Subscriptions, click Add:
- Enter a name for the subscription.
- Select the Yandex Data Streams data stream to send email delivery notifications to. If you do not have a data stream, create one.
- Select the Enabled option to activate the subscription.
You can add multiple subscriptions.
-
Click Create configuration.
If you do not have the AWS CLI yet, install and configure it.
To create a configuration, assign the postbox.editor role
to the service account enabling the AWS CLI.
-
In the terminal, define these variables:
ENDPOINT=https://postbox.cloud.yandex.net PROFILE=<profile_name> CONFIGSET_NAME=<configuration_name> IDENTITY=<domain> KINESIS_ENDPOINT=https://yds.serverless.yandexcloud.net/ru-central1/<directory_ID>/<YDB_database_ID> TOPIC=<data_stream_name>
-
Create a configuration:
aws sesv2 create-configuration-set \ --endpoint-url=$ENDPOINT \ --profile $PROFILE \ --configuration-set-name $CONFIGSET_NAME
-
Add a subscription to the configuration:
aws sesv2 create-configuration-set-event-destination \ --endpoint-url=$ENDPOINT \ --profile $PROFILE \ --configuration-set-name $CONFIGSET_NAME \ --event-destination-name <subscription_name> \ --event-destination "{\"Enabled\":true,\"KinesisFirehoseDestination\":{\"DeliveryStreamArn\":\"arn:aws:keenesis:::$KINESIS_ENDPOINT:$TOPIC\",\"IamRoleArn\":\"arn:\"}}"
You can add multiple subscriptions.
To get notifications, link the configuration to an address.