-
Notifications
You must be signed in to change notification settings - Fork 819
(gen2-migration): refactor command should handle geofence collection resources #14703
Description
Is this feature request related to a new or existing Amplify category?
No response
Is this related to another service?
No response
Describe the feature you'd like to request
The amplify gen2-migration refactor command currently cannot move GeofenceCollection resources from Gen1 to Gen2 stacks. Gen1 represents GeofenceCollections as Custom::LambdaCallout resources, which CloudFormation StackRefactor does not support (only FULLY_MUTABLE provisioning types are supported). This blocks the entire refactor command for any app that has a GeofenceCollection, preventing other resources (auth, storage, etc.) from being refactored as well.
Ref: CloudFormation Stack Refactoring — Resource limitations
Describe the solution you'd like
Support migrating geofence data from the Gen1 collection to the Gen2 collection during the refactor step, using the Location Service API:
- ListGeofences to read geofences from the Gen1 collection
- BatchPutGeofence to write them into the Gen2 collection
Describe alternatives you've considered
Manual migration: Document the ListGeofences/BatchPutGeofence workflow and let users handle it outside the CLI.
Additional context
- Map and PlaceIndex are stateless and don't need refactoring. Only GeofenceCollection holds user data
- The generate step already handles geo codegen correctly (Map, PlaceIndex, GeofenceCollection all generate fine)
- Current behavior: refactor throws
Unsupported resource '<name>' (geo:GeofenceCollection). GeofenceCollection refactor is not supported.and blocks the entire refactor - Error from CloudFormation when attempted:
Stack Refactor does not support Custom::LambdaCallout
Is this something that you'd be interested in working on?
- 👋 I may be able to implement this feature request
Would this feature include a breaking change?
-
⚠️ This feature might incur a breaking change