AWS 24 's IaC generator scans a region (start-resource-scan) and writes a template for up to 500 of the resources found (create-generated-template), ready for an import or cdk migrate; LocalStack 63,725 answers "not currently supported". Former2 2,415 (github.com/iann0036/former2 (https://github.com/iann0036/former2 2,415 ), MIT) does the same from a browser. Auto-import, the --import-existing-resources flag of create-change-set, adopts resources with a static name and a Retain or RetainExceptOnCreate deletion policy while creating a stack. On LocalStack it fails dangerously:
aws cloudformation create-change-set --stack-name booknest-wishlist --change-set-name adopt \
--change-set-type CREATE --import-existing-resources --template-body file://wishlist.yaml \
--query Id --output text
aws cloudformation wait change-set-create-complete --stack-name booknest-wishlist \
--change-set-name adopt
aws cloudformation execute-change-set --stack-name booknest-wishlist --change-set-name adopt
aws cloudformation wait stack-create-complete --stack-name booknest-wishlist 2>/dev/null
aws cloudformation describe-stacks --stack-name booknest-wishlist \
--query 'Stacks[0].StackStatus' --output text
aws cloudformation delete-stack --stack-name booknest-wishlist
aws cloudformation wait stack-delete-complete --stack-name booknest-wishlist
aws dynamodb list-tables --query TableNames --output textarn:aws:cloudformation:us-east-1:000000000000:changeSet/adopt/0f4baef5 ROLLBACK_COMPLETE booknest-books
LocalStack ignored the flag, failed with "Table already exists", and reported ROLLBACK_COMPLETE without rolling anything back. Deleting that stack then deleted the hand-made table, which the stack never created. On AWS the adoption succeeds, and a failed create never deletes a resource that existed before.