# Data Locality

Data locality is the placement of data and the workloads that use it close together to reduce network movement, latency, and transfer costs.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/data-locality

> In cloud architectures, locality can mean using the same Region, Availability Zone, or processing environment, depending on the workload. It matters because network boundaries affect performance and billing, while replication and geographic distribution introduce trade-offs involving resilience, consistency, and data residency.

Practice exams covering Data Locality: [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [SOA-C03 AWS Certified CloudOps Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 6 key aspects of Data Locality

Data locality combines access-aware placement, transfer-aware cost analysis, reduced data movement, and deliberate trade-offs with resilience and location requirements.

1. **Placement follows access patterns**: Place processing near the datasets it accesses most heavily, and place frequently requested content near its consumers. Measure transferred bytes and request frequency rather than choosing locations solely from the application's deployment location.
2. **Transfer direction affects billing**: Internet ingress into AWS is generally free of transfer charges, while internet egress and inter-Region transfers commonly incur charges. Identify the source, destination, and service-specific billing rules for each flow.
3. **Network boundaries have different costs**: Same-Region does not automatically mean free transfer: cross-Availability Zone traffic can be chargeable. Conversely, some service pairings, such as S3 and EC2 within the same Region, have free transfer even though they do not share a customer-selected zone.
4. **Move less data**: Filter, aggregate, compress, or cache data before sending it across expensive or slow boundaries. Sending a compact query result is often more efficient than moving the source dataset to the consumer.
5. **Resilience can justify remote copies**: Multi-zone and cross-Region designs may intentionally sacrifice some locality to meet availability and disaster recovery objectives. Include replication traffic, extra storage, and synchronization behavior in the design.
6. **Locality is distinct from residency**: Locality concerns proximity between data and its consumers; residency concerns permitted storage or processing locations. A nearby cache or replica must still satisfy applicable location restrictions.

## Cloud services for Data Locality

S3 provides regional data storage, while EC2 and EMR supply processing that can run near those datasets. RDS provides application databases whose placement should be coordinated with application compute, without abandoning required availability protections. CloudFront addresses a different locality problem by caching content near geographically distributed viewers. Together, these services support keeping large scans and frequent database exchanges close to their sources while distributing selected results or cached content to users. Evaluate each connection separately: service-specific transfer exemptions do not remove storage, request, replication, or intermediate networking charges.

- **[Amazon S3](https://blowstack.com/tools/cloud-services-hub/amazon-s3)**: S3 buckets have a selected AWS Region, making bucket location important for nearby processing and replication costs. Transfer between S3 and EC2 in the same Region is generally free, while cross-Region copying introduces transfer costs alongside requests and destination storage.
- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-ec2)**: EC2 instances are placed in specific Availability Zones, allowing engineers to locate processing near databases, peers, and regional storage. Same-zone private-IP instance traffic and cross-zone instance traffic have different transfer pricing, so placement should consider both cost and availability.
- **[Amazon RDS](https://blowstack.com/tools/cloud-services-hub/amazon-rds)**: Placing application servers near an RDS database reduces network latency and can limit chargeable application traffic across zones or Regions. Multi-AZ deployments and cross-Region read replicas introduce resilience or read-locality benefits, with deployment-specific transfer and replication pricing.
- **[Amazon CloudFront](https://blowstack.com/tools/cloud-services-hub/amazon-cloudfront)**: CloudFront caches supported content at edge locations near viewers, reducing repeated origin fetches and improving response latency. AWS-origin transfer to CloudFront is generally free, but CloudFront viewer delivery and requests have their own pricing.
- **[Amazon EMR](https://blowstack.com/tools/cloud-services-hub/amazon-emr)**: EMR runs data-processing workloads that benefit from proximity to their input datasets. Using the same Region as S3 inputs avoids unnecessary inter-Region reads, while distributed processing frameworks can also exploit worker-local data when available.

## Data Locality exam questions

Real practice exam questions on Data Locality, with the correct answer and its explanation.

### Question 1 (CLF-C02)

**Question:**

A company runs a temporary batch-processing job on two Amazon EC2 instances. The instances exchange several terabytes of intermediate results each day. The job does not require instances in separate Availability Zones, and all instance configurations have the same compute cost. Which deployment will minimize EC2 data transfer charges for the exchanged results?

**Correct answer:** Place the instances in the same Availability Zone and exchange results directly using private IP addresses.

**Explanation:** Data transferred directly between EC2 instances using private IP addresses within the same Availability Zone is free of data transfer charges. This placement minimizes transfer costs and meets the job's requirements.

### Question 2 (SOA-C03)

**Question:**

A company runs a reporting application on Amazon EC2 instances in us-west-2. The application queries an authoritative database hosted on an EC2 instance in us-east-1 through an existing inter-Region VPC peering connection. Each report performs thousands of sequential, dependent database requests, reads several gigabytes of data, and produces a summary smaller than 1 MB.

Tracing shows that the application spends most of its time waiting for network round trips. CPU utilization is low, database storage latency is consistently low, and network throughput is well below the instances' limits. The database must remain in its current location, and the company prohibits creating additional database copies. Reporting instances can be replaced, and interrupted reports can be restarted.

Which change will BEST reduce report completion time and inter-Region data transfer volume?

**Correct answer:** Launch the reporting instances in the database instance's Availability Zone in us-east-1, query the database through private IP addresses, and transfer only completed summaries to us-west-2.

**Explanation:** Running the reporting computation near the authoritative database removes inter-Region round trips from the database request path. The gigabytes of database reads remain local to the Availability Zone, while only the small completed summaries cross Regions. This meets the restrictions without creating another database copy.

### Question 3 (SAP-C03)

**Question:**

A company operates a document-analysis application in us-east-1 and maintains a warm disaster recovery deployment in us-west-2. Each deployment has a local copy of the documents. Inference requests contain several megabytes of document content and must use a specific Amazon Bedrock foundation model. Single-Region on-demand inference quotas cannot support peak traffic, and quota increases are unavailable.

The primary deployment uses a cross-Region inference profile. Security approved that profile after verifying that all its destination Regions, when invoked from us-east-1, are permitted by company policy. An SCP denies Bedrock inference in all other Regions.

During a recovery exercise, the application invokes the same profile through the us-west-2 Bedrock endpoint and receives authorization errors. Investigation confirms that the profile's destination list from us-west-2 includes a prohibited Region. The profile catalog also contains an alternative for the same model whose complete destination list from us-west-2 is approved and whose quotas meet peak requirements.

The company must preserve the Region restrictions and support peak traffic during recovery while minimizing application-managed inter-Region data transfer. Which solution should a solutions architect recommend?

**Correct answer:** Validate the alternative profile's destination list from us-west-2, authorize invocation across its complete approved destination set, and configure the recovery deployment to invoke that profile through the local Bedrock endpoint.

**Explanation:** A profile defines both the model and eligible destination Regions, and some profiles have different destinations depending on the source Region. Selecting the alternative validated for us-west-2 preserves the Region restrictions and provides the required cross-Region inference quotas. Bedrock automatically routes requests to the profile's destinations, avoiding an application-managed cross-Region relay.

### Question 4 (DEA-C01)

**Question:**

A company stores 40 TB of new telemetry data each day in an Amazon S3 bucket in us-east-1. An Apache Spark job on an Amazon EMR cluster in eu-west-1 reads the entire daily dataset and produces a 50 MB summary for an application in eu-west-1. The raw data must remain in us-east-1, but processing is permitted in either Region. Network transfer between Regions accounts for much of the job's runtime and cost. The application needs only the summary, and no other workload requires raw data in eu-west-1.

Which change will MOST reduce inter-Region data transfer while preserving the application's required output?

**Correct answer:** Run the EMR job in us-east-1, read the existing source bucket, and transfer only the completed summary to eu-west-1.

**Explanation:** Processing in the source data's Region avoids transferring the 40 TB input between Regions. Only the 50 MB summary must cross the Region boundary to reach the application, substantially reducing inter-Region transfer.

### Question 5 (SAA-C03)

**Question:**

A SaaS company operates identical API frontends in two AWS Regions. Each tenant's database is stored in exactly one of these Regions, which is recorded in an existing tenant directory. Tenants' users travel worldwide, so a user's location does not reliably indicate the location of the tenant's database.

A shared API hostname currently distributes requests equally between the regional frontends. Each frontend queries the tenant's database over private connectivity, including across Regions when necessary. Database responses are large, change frequently, and cannot be cached. The company has identified these cross-Region database responses as a major network expense.

The databases must remain in their assigned Regions, and additional database replicas are not permitted. Clients can be updated to use a regional API endpoint after authentication. Both regional deployments must remain operational, but cross-Region failover is outside the scope of this change.

Which change will minimize inter-Region data transfer charges for database responses?

**Correct answer:** After authentication, use the tenant directory to return the API endpoint in the tenant's assigned database Region. Configure clients to send subsequent requests directly to that endpoint.

**Explanation:** This directs each tenant's requests to a frontend in the same Region as its database. Large database responses remain within that Region instead of crossing the inter-Region connection. The existing directory supplies the required mapping without moving or replicating databases.

## Practice Data Locality in a full exam

Questions on Data Locality in each practice exam, with every answer option and an explanation for each:

- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 24 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 13 questions
- [SOA-C03](https://blowstack.com/practice-exams/aws-certified-cloudops-engineer-associate): 5 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 2 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 1 question
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 1 question

## What is Data Locality

Data locality means placing computation near the data it reads or writes, or placing frequently accessed data near its consumers. The objective is to avoid unnecessary network movement. A batch job that scans a large dataset benefits from running near the storage location, while a globally accessed website benefits from caching content near users. Locality is relative to the access pattern: the best location for analytics may differ from the best location for serving customers.

Cloud architecture applies this idea through Region selection, Availability Zone placement, replication, caching, and workload scheduling. First identify where data originates, where it is stored, and which applications consume it. Then map the network boundaries crossed by each important flow. A useful estimate is the volume transferred across each billable boundary multiplied by its applicable transfer rate, with storage, requests, and network processing charges calculated separately.

For AWS pricing questions, distinguish incoming transfer from outgoing transfer. Data transferred into AWS from the internet is generally free of data-transfer charges, but this does not make the entire operation free. Upload requests, storage, and any chargeable processing or networking components can still cost money. Data transferred from AWS to the internet generally incurs outgoing transfer charges, subject to service-specific pricing, allowances, and exceptions.

Transfers between AWS Regions generally incur inter-Region transfer charges. For common transfers such as copying Amazon S3 objects to another Region, the source incurs outgoing inter-Region transfer charges, while incoming transfer at the destination is generally free. Destination storage and replication-related requests remain separate costs. Always check the services and transfer direction involved rather than assuming that every transfer has the same billing treatment.

Within one Region, the Availability Zone and service pairing matter. Ordinary Amazon EC2 instance-to-instance traffic using private IP addresses within the same Availability Zone is generally free of transfer charges. Traffic between EC2 instances in different Availability Zones generally incurs regional transfer charges on both sides. However, service-specific exceptions exist: data transfer between Amazon S3 and EC2 in the same Region is generally free, even though S3 is a regional service rather than storage placed in a customer-selected Availability Zone. Therefore, neither “all internal traffic is free” nor “all cross-zone traffic is charged identically” is a reliable rule.

For example, an analytics team can run its processing workers in the same Region as its object storage rather than repeatedly reading terabytes across Regions. Filtering and aggregating locally before sending a small result elsewhere further reduces traffic. Similarly, a frequently communicating application and database can benefit from geographic proximity. Routing still matters: a NAT gateway or other intermediate component can introduce processing charges even when the underlying service-to-service transfer is free.

Locality must be balanced against availability and recovery requirements. Keeping every component in one Availability Zone may reduce transfer costs but exposes the workload to a shared failure boundary. Multi-zone deployments and cross-Region disaster recovery deliberately move data to improve resilience. Replicas and caches also require storage, synchronization, and decisions about stale reads. Data locality is not synonymous with data residency: proximity improves efficiency, whereas residency requirements constrain where data may be stored or processed. Choose placement using workload measurements, current pricing, recovery objectives, and applicable location requirements.

## Learn Data Locality in lessons

7 short lessons on Data Locality in 6 certification courses.

- CLF-C02: Data Locality: placement and data transfer costs (Premium), https://app.blowstack.com/lessons/data-locality-placement-and-data-transfer-costs-clf-c02
- SOA-C03: Data Locality: compute and storage placement (Premium), https://app.blowstack.com/lessons/data-locality-compute-and-storage-placement-soa-c03
- SAP-C03: Data Locality: cost-aware placement across Zones and Regions (Premium), https://app.blowstack.com/lessons/data-locality-cost-aware-placement-across-zones-and-regions-sap-c03
- DEA-C01: Data Locality: placing distributed computation near data (Premium), https://app.blowstack.com/lessons/data-locality-placing-distributed-computation-near-data-dea-c01
- DOP-C02: Data Locality: regional placement for global workloads (Premium), https://app.blowstack.com/lessons/data-locality-regional-placement-for-global-workloads-dop-c02
- SAA-C03: Data Locality: placing compute near data (Premium), https://app.blowstack.com/lessons/data-locality-placing-compute-near-data-saa-c03
