The Simplest Way to Make Azure App Service and S3 Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use azure app service and s3 together to run web apps that read and write cloud files. The web app runs on Microsoft cloud servers while Amazon stores the raw data. This cross-cloud setup lets your team use the best tool from each provider. Your web code stays in one place, and your large files stay in another. You do not need to move terabytes of data just to host an app. How azure app service and s3 exchange identity and data In the past, engineers put static secret keys into the web

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use azure app service and s3 together to run web apps that read and write cloud files. The web app runs on Microsoft cloud servers while Amazon stores the raw data.

This cross-cloud setup lets your team use the best tool from each provider. Your web code stays in one place, and your large files stay in another. You do not need to move terabytes of data just to host an app.

How azure app service and s3 exchange identity and data

In the past, engineers put static secret keys into the web app settings. That old habit creates big risks for any cloud team. If a key leaks, an attacker can read or delete every file in your bucket.

A better way uses open identity standards to link the two clouds. First, you give your web app a managed identity inside the Microsoft cloud. Next, you set up Amazon to trust tokens from that specific identity provider.

When the web app needs a file, it asks Microsoft for a token. The app sends that token to Amazon to trade it for temporary access. Amazon checks the token and grants a short role session to the app.

Once the role is active, the app sends requests over HTTPS to the storage bucket. The app reads or writes the needed objects and closes the session. No human ever sees a password, and no static key sits on a disk.

Common failure modes and how to scope roles

Cross-cloud setups often fail when teams share one broad role across many apps. If ten apps use the same role, you cannot tell which app changed a file. Worse, a bug in one small app can wipe out data for the rest.

Service-to-Service Authentication + Azure RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another common trap is granting full bucket rights when an app only reads data. Teams also forget to log which app instance made a specific storage call. When an audit happens, the security team sees one generic role doing everything.

To fix this, create one dedicated identity for each web app you run. Map each app identity to its own narrow role on the storage side. If an app only uploads invoices, give it write rights to that folder alone.

You should also lock down the network path between the two cloud providers. Give your web app a dedicated outbound address so traffic comes from known places. Then set your bucket rules to reject requests from any other network source.

Check your token lifetimes and keep them as short as your workload allows. When an app finishes its batch job, the temporary role should expire right away. Turn on storage access logs so you can trace every read and write request.

Finally, watch how developers test this setup from their own laptops during work. Developers often ask for static keys so they can run the app at home. Instead, give developers their own short-lived roles with access to test buckets only.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Do I need to store AWS keys in my web app settings?

No, you should use workload identity federation instead of static keys. Your web app trades its native cloud token for a temporary storage role.

How do I restrict bucket access to my web app only?

Assign fixed outbound IP addresses to your web app in the host cloud. Then add a bucket rule that only allows requests from those exact addresses.

Why do my cross-cloud storage requests fail after an hour?

Temporary role sessions expire when their time limit runs out. Make sure your app code refreshes its token before the active session ends.

The query runs. The emails stay hidden.