Overview
Infracost supports both YAML and JSON formats for CloudFormation (CFN). The following outlines support for the various CFN features:
| Feature | Support |
|---|
| Resources | ✅ |
| Parameters | ✅ |
| Mappings | ✅ |
| Conditions | ✅ |
| Transforms | ✅ |
| Outputs | ✅ |
| DependsOn | ✅ |
| Rules | ✅ |
| Modules | ❌ |
| Intrinsic Functions | ✅ |
| Nested stack support | ✅ |
| Language extensions | ✅ |
| Pseudo parameters | ✅ |
| Dynamic references | ❌ |
| Hooks | ❌ |
| Stack/org tags | ❌ |
| Name | Type | Support |
|---|
| AWS::Serverless-2016-10-31 | Native | ✅ |
| AWS::Include | Native | ✅ |
| AWS::LanguageExtensions | Native | ✅ |
| AWS::CodeDeployBlueGreen | Native | ✅ |
| Count | Community | ✅ |
| Explode | Community | ✅ |
| Boto3 | Community | ✅ |
| ExecutionRoleBuilder | Community | ✅ |
| PyPlate | Community | ❌ |
| StringFunctions | Community | ✅ |
| S3Objects | Community | ✅ |
| ShortHand | Community | ✅ |
| StackMetrics | Community | ❌ |
Intrinsic support
| Name | Type | Support |
|---|
| Base64 | Native | ✅ |
| Equals | Native | ✅ |
| And | Native | ✅ |
| Or | Native | ✅ |
| Not | Native | ✅ |
| Condition | Native | ✅ |
| FindInMap | Native | ✅ |
| FindInMap (extended) | LanguageExtensions | ✅ |
| GetAtt | Native | ✅ |
| GetAZs | Native | ✅ |
| If | Native | ✅ |
| ImportValue | Native | ❌ |
| Join | Native | ✅ |
| Ref | Native | ✅ |
| Select | Native | ✅ |
| Split | Native | ✅ |
| Sub | Native | ✅ |
| Transform | Native | ✅ |
| ForEach | LanguageExtensions | ✅ |
| Length | LanguageExtensions | ✅ |
| ToJsonString | LanguageExtensions | ✅ |
Rain support
| Name | Type | Support |
|---|
| Rain:Embed | Directive | ❌ |
| Rain:Include | Directive | ❌ |
| Rain:Env | Directive | ❌ |
| Rain:S3Http | Directive | ❌ |
| Rain:S3 | Directive | ❌ |
| Fn::Select | Intrinsic | ❌ |
| Fn::InsertFile | Intrinsic | ❌ |
| Fn::Invoke | Intrinsic | ❌ |
| Modules | Entrypoint | ❌ |
| Packaging | Entrypoint | ❌ |
Limitations
Tagging policies
Infracost tagging policies create issues for resources where tag values are invalid, but do not create issues for missing tags on CloudFormation resources. Tags can be defined directly in AWS (for example, as stack-level tags in the console or CLI), and since Infracost does not have access to those tags, missing tags are not checked in order to avoid false positives.