Visually Design Serverless Applications with AWS Application Composer - Automatic IaC Template Generation

Learn about visual design of serverless architectures with Application Composer, automatic SAM template generation, and VS Code integration.

Overview of Application Composer

Application Composer is a service that lets you visually design serverless application architectures and automatically generate SAM templates. Instead of hand-writing YAML, you simply place resources on a canvas and connect them, and a template with the correct IAM policies and event source configurations is generated.

Visual Design and Bidirectional Sync

Drag a Lambda function onto the canvas and connect it to API Gateway, and the API Gateway event source mapping and Lambda execution role are automatically generated. Connect a DynamoDB table to Lambda, and the table's ARN is set as an environment variable while DynamoDB access permissions are added to the IAM policy. A key feature is bidirectional sync: visual changes are immediately reflected in YAML, and manual YAML edits are reflected in the visual view. Using the VS Code extension, you can visually edit existing local SAM templates.

Team Development and Limitations

Templates designed in Application Composer can be locally tested with SAM CLI and committed to a Git repository to follow a standard IaC workflow. Changes made on the visual canvas are immediately reflected in YAML, so differences can be reviewed in code reviews. However, the resource types supported by Application Composer are limited to major serverless resources such as Lambda, API Gateway, DynamoDB, S3, SQS, SNS, and Step Functions. Resources like VPC, RDS, and ElastiCache must be manually added to the YAML and will not appear on the visual canvas. For templates that heavily use complex Conditions and Mappings, the boundary between visual editing and manual editing becomes blurred, so it is important for teams to establish rules about what to manage in Composer and what to write by hand. For more detailed coverage of serverless design, you can also check out related books on Amazon.

Choosing Between CloudFormation, SAM, and Application Composer

Application Composer is positioned as a visual editor for SAM templates and does not replace CloudFormation or SAM CLI. It is most powerful when rapidly prototyping new serverless applications. Importing large existing templates (hundreds of resources) can make the canvas cluttered and reduce usability, so applying it to existing projects should be done carefully. For projects using CDK, it is possible to visualize the CloudFormation templates generated by CDK constructs in Composer, but since there is no feature to reverse-convert Composer edits back to CDK code, using it as a read-only visualization tool is the practical approach. Combined with SAM Accelerator (sam sync), you can rapidly iterate through a cycle of designing in Composer, hot-deploying with sam sync, and verifying behavior.

Application Composer Pricing

Application Composer is completely free to use. There are no additional charges for the AWS console visual editor, VS Code extension, or automatic SAM template generation. The only costs are the usage charges for AWS resources deployed from the generated templates. Running local tests with SAM CLI also incurs no additional charges, allowing you to build your entire development workflow at no cost.

Summary

Application Composer is a tool that visualizes serverless application design and accelerates initial IaC setup through automatic SAM template generation. Bidirectional sync between the visual canvas and YAML eliminates the gap between design and implementation. Understanding the limitations of supported resources, it is most effective for prototyping and small to medium-sized serverless projects.