Skip to content

(gen2-migration): refactor command should handle geofence collection resources #14703

@sai-ray

Description

@sai-ray

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:

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions