Question

Difficulty: EasyImplement Azure Event Grid Solutions

You are implementing an Azure Event Grid solution. You need to configure dead-lettering for an Event Grid subscription that routes events from a custom topic to an Azure Queue Storage queue. The dead-lettered events must be securely stored in an Azure Blob Storage container using a system-assigned managed identity.

Which four actions should you perform in sequence to configure and test this dead-lettering solution? To answer, arrange the actions in the correct order.

  1. 1Create an Azure Storage account and a Blob Storage container.
  2. 2Assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account.
  3. 3Create the Event Grid subscription, specifying the Queue Storage queue as the endpoint and the Blob container as the dead-letter destination.
  4. 4Publish events to the custom topic that are guaranteed to fail delivery to verify that they are successfully written to the Blob container.

Answer

To configure dead-lettering with a system-assigned managed identity, you must first create the Azure Storage account and Blob Storage container. Next, assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account. Then, create the Event Grid subscription, specifying the Queue Storage queue as the endpoint and configuring the Blob container for dead-lettering. Finally, test the configuration by publishing events that fail delivery to verify they are dead-lettered.
The correct sequence starts with creating the Storage account and Blob container. Next, permissions must be configured by assigning the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account, which allows Event Grid to write the dead-lettered events. After permissions are established, you create the Event Grid subscription, specifying the Queue Storage queue as the endpoint and configuring the dead-letter destination. Finally, you publish test events that fail delivery to verify that they are correctly written to the Blob container.

Step-by-Step Solution

1
Create the target Storage account and Blob container.
The destination storage resources are provisioned.
The dead-letter container must exist before permissions can be granted or the configuration is applied.
2
Assign the Storage Blob Data Contributor role to the Event Grid system-assigned managed identity on the Storage account.
Event Grid is authorized to write blobs to the storage account.
Event Grid requires write permissions to the storage account to upload dead-lettered events. Without this step, subscription creation will fail validation.
3
Create the Event Grid subscription and define both the endpoint and dead-letter settings.
The Event Grid subscription is created and active.
The subscription links the custom topic to the Queue Storage queue and references the Blob container for dead-lettering.
4
Publish events designed to fail delivery (e.g., targeting a non-existent handler or exceeding retry limits).
The failed events appear in the Blob Storage container.
This verifies that the entire pipeline, including routing and security configuration, works correctly.

Key Concept

Configuring dead-lettering with managed identity authorization in Azure Event Grid subscriptions.
Rate this question