Migrating to Amplify Android From AWS Mobile SDK

July 29, 2025 ยท View on GitHub

Amplify Android simplifies integrating AWS services into Android apps, making it easier to add features like authentication, data storage, and real-time updates without lots of code. This user-friendly interface not only cuts down on complexity but also speeds up the development process. With Amplify Android, developers get tools that make setup straightforward, provide detailed documentation, and support advanced capabilities like offline data sync and GraphQL. This means you can spend less time dealing with the technicalities of cloud integration and more time crafting engaging user experiences. Choosing Amplify Android could lead to quicker development, plus applications that are both scalable and secure.

General Migration Notes

  • Amplify Android is the recommended library for all new Android related development.
  • For any AWS service not yet supported by Amplify, you can use the AWS SDK for Kotlin or reference Kotlin SDK code examples.
  • Amplify will make a best-effort attempt to preserve user auth sessions during migration, but some users may need to re-authenticate.

Categories

Authentication

AWS SDK For AndroidAmplify Android
SignUpSign Up
Confirm SignUpConfirm SignUp
Sign InSign In
Guest AccessGuest Access
Drop-in AuthAmplify UI Authenticator
Confirm Sign In (MFA)MFA
Change PasswordChange Password
Forgot PasswordReset Password
Managing Tokens and CredentialsAccessing Credentials
SignOutSign Out
Global SignOutGlobal Sign Out
Federated IdentitiesFederated Identities
Hosted UIWeb UI Sign In / Social Web UI Sign In
Custom Auth FlowCustom Auth Flow
Track/Remember DeviceTrack/Remember Device

Notes:

  • Drop-in Auth provided by AWSMobileClient is replaced with Authenticator UI component. Additionally, Authenticator UI component does not support social providers yet. You can track updates on it here.

  • To manually refresh the ID and access tokens (such as in scenarios where you might need to ensure that you have the latest tokens, perhaps because of changes in permissions or other security-related updates) refer to Amplify docs

  • Amplify Sign In's will handle token refreshing as long as the refresh token is valid. Amplify does not support refreshing tokens automatically through federateToIdentityPool().

Storage

AWS SDK For AndroidAmplify Android
Upload FileUpload File
Download FileDownload File
Track ProgressTrack Progress Download
Pause/Resume/Start/CancelPause/Resume/Start/Cancel
Long-running TransfersAmplify supports this by default
Transfer with MetadataTransfer with Metadata
Transfer Network Connection TypeAmplify does not support this for now

REST API

AWS SDK For AndroidAmplify Android
Basic OperationsCreate, Fetch, Update, Delete
IAM AuthorizationIAM Authorization
Cognito User pool AuthorizationCognito User pool Authorization

Push Notification

Pinpoint deprecation notice โ€“ Pinpoint will be retired Oct 30 2026. AWS End User Messaging is the recommended successor. Plan migrations accordingly.

AWS SDK For AndroidAmplify Android
Setup, Push Notification Service SetupSetup, Push Notification Service Setup
Register DeviceRegister Device
Record Notification EventsRecord Notification Events

Analytics

AWS SDK For AndroidAmplify Android
Manually Track SessionAutomatically Track Session
Add AnalyticsAdd Analytics
Authentication EventsAuthentication events
Custom EventsCustom Events
Monetization eventsPlease Check Notes

Notes:

  • For recording events:

When migrating from the AWS SDK for Android to Amplify, you'll need to adjust your approach to handle user sessions, as the two libraries have different mechanisms for managing user authentication and session management.

  • Use Amplify.Analytics.recordEvent() for recording Monetization event.
// Example:    
    val PURCHASE_EVENT_NAME = "_monetization.purchase"
    val PURCHASE_EVENT_QUANTITY_METRIC = "_quantity"
    val PURCHASE_EVENT_ITEM_PRICE_METRIC = "_item_price"
    val PURCHASE_EVENT_PRODUCT_ID_ATTR = "_product_id"
    val PURCHASE_EVENT_PRICE_FORMATTED_ATTR = "_item_price_formatted"
    val PURCHASE_EVENT_STORE_ATTR = "_store"
    val PURCHASE_EVENT_TRANSACTION_ID_ATTR = "_transaction_id"
    val PURCHASE_EVENT_CURRENCY_ATTR = "_currency"
    
    val event = AnalyticsEvent.builder()
            .name(PURCHASE_EVENT_NAME)
            .addProperty(PURCHASE_EVENT_PRODUCT_ID_ATTR, productId)
            .addProperty(PURCHASE_EVENT_STORE_ATTR, store)
            .addProperty(PURCHASE_EVENT_QUANTITY_METRIC, quantity)
            .addProperty(PURCHASE_EVENT_PRICE_FORMATTED_ATTR, formattedItemPrice)
            .addProperty(PURCHASE_EVENT_ITEM_PRICE_METRIC, itemPrice)
            .addProperty(PURCHASE_EVENT_TRANSACTION_ID_ATTR, transactionId)
            .addProperty(PURCHASE_EVENT_CURRENCY_ATTR, currency)
            .build()
    Amplify.Analytics.recordEvent(event)
  • Amplify Analytics events have default configuration to flush out to the network every 30 seconds. This interval can be configured in amplifyconfiguration.json. Refer Flush Events section in Amplify Documentation for more details.
  • Limits applicable to ingestion of events for Amazon Pinpoint can be found here.

AWS IoT

Notes: