CloudFormation IAM Template Generator produces a complete, ready-to-review CloudFormation template — not a single bare resource snippet. Paste your policy JSON and it generates the full AWSTemplateFormatVersion, a Parameters section (a RoleName parameter), a Resources section containing an AWS::IAM::Role with an AssumeRolePolicyDocument for a chosen AWS service principal plus the attached policy carrying your JSON, and an Outputs section exporting the role's ARN and name.
The policy document is embedded as inline JSON under PolicyDocument:, which CloudFormation accepts directly since JSON is a valid subset of YAML — the simplest, most robust way to reproduce your policy exactly without a lossy JSON-to-YAML re-encoding.
You can choose between an inline AWS::IAM::Policy attached to the role (the default) or a standalone AWS::IAM::ManagedPolicy. Every logical id, parameter default, and policy name is a clearly labeled placeholder to review and rename before deploying.