From messing around with Resource Explorer in the console and exporting results to CSV, it looks like most of the time there's a simple mapping from AWS type to Pulumi type in the AWS Classic provider, and it also looks like the ID is the same ID for import:
If I'm right, I think that would give us several advantages over the current approach:
AWS maintains an index of all resources on its end (asynchronously updated, I'm guessing), so it should be faster than querying type-by-type (which is what I think the current code does?)
We'd be returning AWS Classic resources instead of AWS Native. Since the former is more popular, this should deliver more value to the customer.
I believe the AWS Resource Explorer can be used to query resources: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/resourceexplorer2
From messing around with Resource Explorer in the console and exporting results to CSV, it looks like most of the time there's a simple mapping from AWS type to Pulumi type in the AWS Classic provider, and it also looks like the ID is the same ID for import:
If I'm right, I think that would give us several advantages over the current approach: