Reputation: 1
Masstransit- how to enable Encryption for Amazon queue. I am using AWSSQS queue/topic for messaging purposes & wanted to enable server-side encryption. I am not using ReceiveEndPoint function so please suggest me the way to enable encryption & way to choose between SSE_SQS & SSE_KMS.
I tried with
busRegister.UsingAmazonSqs((context,cfg)=>{
cfg.Host("Region",x=>{
x.AccessKey("x");
x.SecreteKey("Y");
});
cfg.QueueAttributes.Add(QueueAttributeName.SqsManagedSseEnabled, "true");
cfg.QueueAttributes.Add(QueueAttributeName.KmsMasterKeyId, "alias/kmsid");
});
Upvotes: 0
Views: 35
Reputation: 33457
You can use a configure endpoints callback:
x.AddConfigureEndpointsCallback((name, cfg) =>
{
if (cfg is IAmazonSqsReceiveEndpointConfigurator configurator)
{
configurator.QueueAttributes.Add(QueueAttributeName.SqsManagedSseEnabled, "true");
configurator.QueueAttributes.Add(QueueAttributeName.KmsMasterKeyId, "alias/kmsid");
}
});
Upvotes: 0