Access AWS secret manager from Azure VM

Sivanesan 20 Reputation points
2024-03-22T03:09:12.1+00:00

Hi Everyone

I have some secrets stored in AWS secret manager and I want to use them in .Net application inside my Azure VM.

How can I achieve this. Is there any documentation available to access AWS resources from Azure.

Regards

Sivanesan

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
317 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 24,106 Reputation points Microsoft Employee
    2024-03-22T05:37:58.8266667+00:00

    Hello Sivanesan

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    I am sharing high-level steps that can help you get started.

    1.In Azure VM (where yout.NET application is running) install the AWS SDK for .NET.

    https://aws.amazon.com/sdk-for-net/

    2.On AWS side you need to allow permissions from Azure VM access the AWS Secret Manager.

    -For this, you can create and IAM role on AWS and grant assign it the necessary permissions to read secrets from Secret Manager. Attach this IAM role to your Azure VM instance.

    https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create.html

    https://stackoverflow.com/questions/69350871/attach-aws-iam-profile-to-azure-vm

    -Other alternative is using Access & Secret Keys in AWS, you can create an IAM user in AWS, generate an access key and secret key, and use them in your .NET application to authenticate with AWS.

    https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html

    3.In your .NET application, use the AWS SDK for .NET to retrieve the secrets from AWS Secret Manager.

    Note: As this is cross cloud query, few things might have changed please check the latest documentation to confirm the approach.

    I hope this helps!

    0 comments No comments