Can an Azure Function Managed Identity Upload to Amazon S3 Without Long-Lived Keys?

0
0
Asked By MellowPine42 On

We have an Azure Function using a system-assigned managed identity. Can that identity be trusted by AWS so the function can upload objects to an Amazon S3 bucket without storing and manually rotating access keys? If so, what setup is required on the Azure and AWS sides?

1 Answer

Answered By CloudyHarbor7 On

Yes. The usual approach is to use federated identity with OpenID Connect (OIDC). Configure Azure to issue tokens for the managed identity, register Azure as an OIDC identity provider in AWS IAM, and create an IAM role with a trust policy that accepts only the intended Azure identity. Grant that role the minimum S3 permissions needed, such as uploading objects to a specific bucket and prefix. The Function can then obtain a token through its managed identity and exchange it with AWS STS for temporary role credentials, avoiding long-lived keys and manual rotation.

MellowPine42 -

So the AWS side is based on an IAM OIDC identity provider and a role trust policy, rather than creating an IAM user? I’ll look into the OIDC provider and web-identity role-assumption documentation.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.