Sharing S3 data across AWS accounts is common in organizations that separate workloads by team, environment, business unit, or customer.
The difficult part is usually not storing the data. The hard part is managing access without creating a large set of bucket policies, IAM roles, and cross-account permissions that become hard to maintain.
S3 Access Grants provides a way to introduce a more structured access layer between users or applications and S3 data. Instead of putting every access rule directly into a bucket policy, you can define which identities or groups should receive access to particular S3 locations.
This is useful when multiple AWS accounts need access to the same data, but the organization still wants centralized control over who can read or write what.
The Cross-Account S3 Access Problem
Imagine an organization with three AWS accounts:
Data Account
|
+-- S3 Bucket
+-- finance/
+-- analytics/
+-- reports/
Application Account
|
+-- Data processing workloads
Analytics Account
|
+-- BI and reporting workloadsThe S3 bucket lives in the Data Account, while applications that need the data run in other accounts.
A traditional approach might involve:
Bucket Policy
|
+-- Account A
+-- Account B
+-- Account C
+-- Role X
+-- Role Y
+-- Role ZAs the number of teams and workloads increases, this becomes harder to maintain.
You also need to understand both sides of the permission model:
Identity-based permissions
+
Resource-based bucket permissions
=
Effective accessA configuration error on either side can prevent access or accidentally expose more data than intended.
What S3 Access Grants Changes
S3 Access Grants introduces a permission model that can map identities and groups to specific S3 data locations.
Instead of thinking only in terms of:
Who can access the bucket?you can think in terms of:
Who can access this particular S3 location?For example:
Finance Team
|
+-- s3://company-data/finance/
Analytics Team
|
+-- s3://company-data/analytics/
Reporting Application
|
+-- s3://company-data/reports/This model becomes particularly useful when access needs to be managed at a more granular level than the bucket itself.
A Typical Cross-Account Architecture
A simplified architecture might look like this:
AWS Organization
|
+------------+------------+
| |
v v
Data Account Application Account
| |
| |
S3 Bucket Workload
^ |
| |
+------ Access Grants ---+The data remains in the account that owns the S3 bucket.
The application runs in another account.
The access configuration determines which S3 locations that application can use.
This separation is useful because the team operating the application does not necessarily need ownership of the underlying data.
Start With the S3 Data Layout
Before configuring Access Grants, design the S3 data hierarchy.
For example:
s3://company-data/
finance/
invoices/
payments/
analytics/
raw/
processed/
reports/
daily/
monthly/Avoid putting unrelated data into the same logical location simply because it is convenient.
Access control becomes easier when the S3 prefix structure reflects actual ownership or access boundaries.
For example:
finance/
analytics/
reports/provides clearer boundaries than a flat structure such as:
data/
file1.csv
file2.csv
file3.csvThe storage layout should support the authorization model.
Create the Access Grants Instance
S3 Access Grants uses an Access Grants instance associated with an AWS Region.
The exact console and API workflow can change as AWS evolves the service, so use the current AWS documentation when configuring the environment.
Conceptually, the configuration looks like:
Access Grants Instance
|
+-- Registered Location
|
+-- Access Grant
|
+-- Grantee
|
+-- S3 Location
|
+-- PermissionThe important idea is that access is represented as a grant rather than being encoded entirely into a large bucket policy.
Register the S3 Location
The next step is to register the S3 location that Access Grants will manage.
For example:
s3://company-data/finance/or:
s3://company-data/analytics/This creates a clear relationship between the Access Grants configuration and the underlying S3 data.
You can think about it as:
Registered Location
|
+-- Bucket
|
+-- PrefixThe prefix is important because access can be scoped to a particular part of the bucket.
Define the Grantee
The grantee represents the identity that should receive access.
Depending on the architecture, this can be an IAM user, IAM role, or identity associated with a supported identity provider.
For cross-account applications, IAM roles are generally the more practical model.
For example:
Application Account
|
+-- AnalyticsAppRoleThe role can then be associated with the required S3 data location.
This creates a useful separation:
Application Account
|
+-- Identity
|
v
Access Grant
|
v
S3 Data LocationGrant Only the Required Permission
Access should be limited to what the application actually needs.
For example, a reporting application might only need read access:
Permission:
READA data processing workload may need:
Permission:
READ
WRITEAvoid giving write access just because the application may need it later.
A useful permission model is:
Workload | Data location | Permission |
|---|---|---|
Reporting | reports/ | Read |
Analytics | analytics/raw/ | Read |
Processing | analytics/processed/ | Read + Write |
Finance app | finance/ | Read + Write |
This makes the access model easier to review.
Configure the Cross-Account IAM Role
The application account still needs an IAM role that the workload can assume.
For example:
Application Account
|
v
AnalyticsAppRole
|
v
ApplicationThe role should be dedicated to the application rather than shared by unrelated workloads.
The trust policy controls who can assume the role.
The permissions policy should contain only the permissions required for the Access Grants workflow.
This distinction is important:
Trust policy
|
+-- Who can use the role?
Permissions policy
|
+-- What can the role do?Do not confuse the two.
Let the Application Request Temporary Access
One of the useful characteristics of this architecture is that applications do not have to be given broad, permanent access to every S3 location.
A workload can request access through the configured authorization model and receive credentials scoped to the required data.
Conceptually:
Application
|
| Request access
v
S3 Access Grants
|
| Temporary scoped credentials
v
Application
|
v
S3 LocationThe application can then use the temporary credentials for the permitted S3 operations.
This can reduce the need to distribute long-lived credentials.
Use the S3 API From a .NET Application
A .NET application can use the AWS SDK to interact with S3.
A normal S3 client might look like this:
using Amazon.S3;
var s3Client = new AmazonS3Client();
var response = await s3Client.GetObjectAsync(
"company-data",
"analytics/reports/report.csv");The important security decision is not the SDK call itself.
It is the credentials used by the client and the permissions attached to those credentials.
The application should not embed access keys in source code:
// Do not do this
var accessKey = "ACCESS_KEY";
var secretKey = "SECRET_KEY";Use IAM roles and the AWS credential provider chain instead.
Keep Bucket Policies Simple Where Possible
Access Grants does not mean that bucket policies disappear.
You may still need bucket policies for other requirements.
The goal is to avoid turning one bucket policy into the central location for every individual access relationship.
For example, instead of maintaining:
Bucket Policy
|
+-- Application A
+-- Application B
+-- Application C
+-- Team D
+-- Team E
+-- Role F
+-- Role Gyou can separate concerns:
Bucket Policy
|
+-- General bucket controls
Access Grants
|
+-- Data access relationshipsThis can make the overall authorization model easier to reason about.
Test Access From Each AWS Account
Cross-account permissions should always be tested from the actual workload account.
For example:
Data Account
|
+-- company-data bucket
Analytics Account
|
+-- AnalyticsAppRole
|
+-- Can read analytics/
+-- Cannot read finance/
+-- Cannot write reports/Do not assume that a successful configuration in the data account means the application will work.
Test the complete authorization path.
Test Both Allowed and Denied Operations
A good security test includes operations that should fail.
For example:
analytics/report.csv
|
+-- READ -> Allowed
finance/payments.csv
|
+-- READ -> Denied
analytics/report.csv
|
+-- DELETE -> DeniedTesting only successful requests can hide an overly broad permission configuration.
The denied tests are often more important because they prove that the boundary exists.
Audit Cross-Account Access
Access to shared data should be observable.
At minimum, the organization should be able to determine:
Which application accessed the data
Which AWS account made the request
Which S3 location was accessed
When the access occurred
Whether the operation succeeded or failed
Use the appropriate AWS logging and monitoring services for your environment and retention requirements.
The goal is to make cross-account access traceable rather than treating it as an invisible connection between accounts.
Common Mistakes
Giving Access to the Entire Bucket
If an application only needs:
analytics/do not automatically grant:
s3://company-data/*Keep the data boundary as narrow as practical.
Sharing IAM Users
Cross-account application access should generally use IAM roles rather than creating shared IAM users with long-lived access keys.
Mixing Unrelated Data
A poorly designed prefix structure makes granular authorization harder.
Organize S3 data around meaningful access boundaries.
Testing Only the Data Account
The real test must come from the application account and workload identity.
Forgetting Denied Access Tests
A successful read proves that access works. It does not prove that access is restricted correctly.
Access Grants vs Traditional Bucket Policies
Area | Traditional approach | Access Grants approach |
|---|---|---|
Access model | IAM + bucket policies | Access grants + IAM |
Fine-grained data access | Possible but can become complex | Designed for granular data access |
Cross-account scenarios | Supported | Supported |
Centralized authorization | Often policy-driven | Grant-driven |
Prefix-level access | Supported | Strong fit |
Operational complexity | Can grow with number of identities | Can simplify large access models |
Access Grants is not a replacement for every S3 security mechanism.
It is another authorization layer that can be useful when an organization has many identities and data locations to manage.
When S3 Access Grants Makes Sense
Access Grants becomes more interesting as the number of users, applications, accounts, and S3 locations increases.
It can be a good fit for:
Multi-account AWS environments
Data lakes
Analytics platforms
Shared organizational datasets
Multi-tenant applications
Central data accounts
Applications requiring prefix-level access
For a small application with one account and one private bucket, a straightforward IAM policy may be easier to operate.
The complexity of the authorization problem should determine whether Access Grants is worthwhile.
Production Checklist
Before using cross-account S3 Access Grants in production, verify:
Area | Check |
|---|---|
Data layout | S3 prefixes match access boundaries |
Identity | Dedicated application roles are used |
Permissions | Access follows least privilege |
Cross-account | Actual workload account is tested |
Network | Required S3 connectivity is available |
Credentials | Long-lived access keys are avoided |
Denied access | Unauthorized operations are tested |
Logging | Access can be audited |
Data ownership | Bucket ownership is clearly defined |
Lifecycle | Grants are reviewed when applications change |
Summary
S3 Access Grants provides a way to manage access to S3 data when multiple identities and AWS accounts need different levels of access.
The key is to separate the data account from the application account and define access around the actual S3 locations that each workload needs.
A practical implementation starts with a well-organized S3 prefix structure, dedicated IAM roles, narrowly scoped grants, and explicit testing of both allowed and denied operations.
For larger multi-account environments, this approach can make S3 authorization easier to manage than putting every access relationship into a growing collection of bucket policies and IAM permissions.

Join the conversation! Your thoughts help the community grow.