I have read through the AWS Documentation and also this summarizing blog article here.
The TL;DR is that CloudFormation "import" requires you to meticulously define, down to the last detail, using CloudFormation template syntax, the resource that you are going to import. It is not possible for example, to use the Console to experiment with different solutions, then import the final workproduct into a CloudFormation template when you are done.
I feel like I must be missing something here. Surely there must be a way to dump the existing resources into JSON or YAML to be put into the template to finalize the import. Where is this step documented?
I have poured through the CLI
and the boto3
documentation and found nothing.
The CloudFormer tool used to support that for a limited selection of resource types, but it is deprecated now. There seems to be a third-party successor: Former2 - see this Stack Overflow question for details: https://stackoverflow.com/questions/62943396/which-aws-services-does-aws-cloudformer-support