AWS Security ChangesHomeSearch

AWS location high security documentation change

Service: location · 2025-10-25 · Security-related high

File: location/latest/developerguide/using-apikeys.md

Summary

Added mobile app restrictions for API keys and expanded client restriction guidance

Security assessment

Introduces granular API key restrictions for Android/iOS apps using application identifiers, directly improving security by reducing credential exposure risks. Includes concrete implementation details for secure usage.

Diff

diff --git a/location/latest/developerguide/using-apikeys.md b/location/latest/developerguide/using-apikeys.md
index c5d00af6c..bf7d08c4c 100644
--- a//location/latest/developerguide/using-apikeys.md
+++ b//location/latest/developerguide/using-apikeys.md
@@ -5 +5 @@
-Create an API keyCall an APIBest practices
+Create an API keyCall an APIRestrict API key usageBest practices
@@ -61 +61 @@ Amazon Location console
-     * **Referrers** – Optionally, add one or more domains where you can use the API key. For example, if the API key is to allow an application running on the website `example.com`, then you could put `*.example.com/` as an allowed referrer.
+     * **Client restrictions** – Optionally, add one or more web domains or one or more Android or Apple apps where you can use the API key. For example, if the API key is to allow an application running on the website `example.com`, then you could put `*.example.com/` as an allowed referrer.
@@ -122,0 +123 @@ Use the [CreateKey](https://docs.aws.amazon.com/location/latest/APIReference/API
+    }
@@ -305,0 +307,40 @@ Use the following code:
+## Restrict API key usage by request origin
+
+You can configure API keys with client restrictions that limit access to specific domains or mobile applications. When restricting by domain, requests will be authorized only if the HTTP Referer header matches the value that you provide. When restricting by Android or Apple application, requests will be authorized only if the application identifier HTTP header fields match the values that you provide.
+
+For more information, see [ApiKeyRestrictions](https://docs.aws.amazon.com/location/latest/APIReference/API_geotags_ApiKeyRestrictions.html) in the _Amazon Location Service API Reference_.
+
+**Android application identifiers:**
+
+  * `X-Android-Package`:
+
+A unique identifier for Android applications, defined in the app's `build.gradle` file, typically following a reverse-domain format.
+
+Example:
+
+`com.mydomain.appname`
+
+  * `X-Android-Cert`:
+
+The SHA-1 hash of the signing certificate used to sign the Android APK.
+
+Example:
+
+`BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75`
+
+
+
+
+**Apple application identifiers:**
+
+  * `X-Apple-Bundle-Id `:
+
+A unique identifier for Apple (iOS, macOS, etc.) applications, defined in the app's `Info.plist`, typically following a reverse-domain format.
+
+Example:
+
+`com.mydomain.appname`
+
+
+
+
@@ -312 +353 @@ API keys include a plain text _value_ that gives access to one or more resources
-To avoid the situation above, it is best to limit your API key. When you create the key, you can specify the domain or referrer where the key can be used. 
+To avoid the situation above, it is best to limit your API key. When you create the key, you can specify the domain, Android app or Apple app where the key can be used.