Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.

Page updated Apr 29, 2024

NewDeploy web apps with Git or your AI coding agent using the latest AWS Amplify. Add managed databases and authentication as you grow. Explore the documentation.
Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade.

Use Amazon Location Service SDK

These docs cover Amplify Gen 1. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.

If you need functionality in the AWSLocation framework used by the Amplify Geo category that isn't available, we provide an escape hatch so you can reference it directly.

Note: If you provisioned your Geo resources via Amplify CLI, then the IAM policy will be specifically scoped to only allow actions required by the library. Please adjust your authorization permissions accordingly for your escape hatch use-cases.

import AWSLocation

Then retrieve the escape hatch and call methods on AWSLocation directly:

do {
// Retrieve AWSLocationGeoPlugin
let plugin = try Amplify.Geo.getPlugin(for: "awsLocationGeoPlugin")
guard let locationPlugin = plugin as? AWSLocationGeoPlugin else {
return
}
// Retrieve reference to AWSLocation
let awsLocation = locationPlugin.getEscapeHatch()
// Make Request
var request = ListMapsInput()
request.maxResults = 5
let response = try await awsLocation.listMaps(input: request)
// handle response ...
} catch {
print("Error occurred while fetching the escape hatch \(error)")
}

Documentation Resources

Maps

Places

Device Tracking