Loading CloudFormation to Pulumi Converter...
How to Convert CloudFormation to Pulumi - Step by Step Guide
Paste Your CloudFormation Template
Copy your CloudFormation template, JSON or YAML, into the left editor, or open a .json, .yaml, .yml or .template file with the Upload button. Parameters, resources, outputs and the common intrinsic functions (Ref, Fn::GetAtt, Fn::Sub, Fn::Join and a few more) are converted; the YAML short tags like !Ref work too.
Review the Pulumi TypeScript Output
The right panel displays the converted Pulumi TypeScript code automatically. The converter maps CloudFormation resource types to their Pulumi equivalents and converts intrinsic functions to TypeScript syntax.
Download or Copy the Pulumi Code
Take the converted program into your project. It starts with the two imports it needs, and it is a first draft: check the property names against the @pulumi/aws types before you deploy.
Deploy with Pulumi CLI
Initialize a new Pulumi AWS project and deploy your infrastructure using the converted code.
pulumi new aws-typescriptnpm install to get required packagespulumi up to preview and deployFrequently Asked Questions
What does the converter turn into Pulumi code?
Parameters become pulumi.Config reads (config.get, config.getNumber, config.getObject, or getSecret when NoEcho is set) with the template default after ??, and a parameter without a default becomes a config.require call. Each resource of a known type becomes a new aws.* resource named after its logical ID, DependsOn becomes the dependsOn option, DeletionPolicy: Retain becomes retainOnDelete, and every output becomes an exported constant.
Can I paste a YAML template with !Ref and !Sub?
Yes. JSON and YAML both work, and the YAML short tags (!Ref, !Sub, !GetAtt, !Join, !Select, !Split, !Base64, !GetAZs and the rest) are read the same as their Fn:: forms. You can also upload a .json, .yaml, .yml or .template file.
Which resource types and functions are supported?
About two dozen common types are mapped, including S3 buckets and bucket policies, EC2 instances, VPCs, subnets, security groups and route tables, RDS instances, Lambda functions, IAM roles, users and policies, DynamoDB tables, SNS topics, SQS queues, CloudWatch alarms, load balancers, API Gateway REST APIs and ECS clusters, services and task definitions. Ref, Fn::GetAtt, Fn::Sub, Fn::Join, Fn::Select, Fn::Split, Fn::Base64, Fn::GetAZs and the AWS:: pseudo parameters are translated. Anything else, such as Fn::If, Fn::FindInMap, Conditions or Mappings, is listed in the Notes comment at the top and left as undefined, so nothing is dropped without a trace.
Are the property names already the ones @pulumi/aws expects?
Not always. Property names are camelCased from the template, so BucketName becomes bucketName, and Tags lists become the { key: value } map Pulumi uses. The Pulumi AWS provider renames some properties and nests others differently, so run tsc or let your editor check the program against the @pulumi/aws types, and fix what it flags. IAM policy documents keep their original keys (Version, Statement, Effect) because AWS reads them as they are.
Will numbers and quoted values stay the same?
Yes. Numbers are written with the digits you typed, so 14.50 stays 14.50 and a long ID like 8901240544102066246 is not rounded in the code. A quoted value such as "00501" stays a string, and quotes, backslashes and line breaks are escaped so every string is valid TypeScript. Keep in mind that a JavaScript number can only hold about 15 digits exactly, so pass a value that long as a string when the property accepts one.
How do I run the converted code?
Create a project with pulumi new aws-typescript, replace index.ts with the downloaded file, set any parameters with pulumi config set, and run pulumi preview before pulumi up. If the stack already exists in CloudFormation, import the resources (pulumi import) instead of creating new ones, or Pulumi will try to create duplicates.
Is my template uploaded anywhere?
No. The template is read and converted in your browser, nothing is sent to a server and nothing is kept, so a reload starts with an empty editor.
Going the other way or to another tool? Try the Terraform to Pulumi or CloudFormation to Terraform converter, or read more in the Pulumi docs.
Related Tools
CloudFormation to Terraform
Convert AWS CloudFormation templates to Terraform HCL configuration
Terraform to CloudFormation
Convert Terraform HCL configurations to AWS CloudFormation templates in YAML or JSON
Azure ARM to Terraform
Convert Azure Resource Manager templates to Terraform HCL with azurerm provider
Ansible to Terraform
Convert Ansible playbooks to Terraform HCL for AWS, Azure, and GCP resources
ARM to Bicep
Convert Azure Resource Manager (ARM) templates to Bicep with modern syntax and improved readability
Bicep to ARM
Convert Bicep files to Azure Resource Manager (ARM) JSON templates for deployment and tooling compatibility