AWS CloudFormation is an infrastructure-as-code tool for specifying resources in a declarative way. You model all the resources you want AWS to spin up in a blueprint document (template) and AWS creates the defined resources for you. Thus, you spend less time managing those resources and more time focusing on your applications that run in AWS.
Terraform covers almost all services and features by AWS and supports third-party providers (platform-agnostic) while CloudFormation is AWS specific (vendor lock-in).
You can use AWS CloudFormation to specify, deploy, and configure serverless applications. You create a template that describes your serverless application dependencies (Lambda functions, DynamoDB tables, API Gateway, IAM roles, and so on), and AWS CloudFormation takes care of provisioning and configuring those resources for you. You...