Reference external files in Application Composer
You can use external files with your AWS Serverless Application Model (AWS SAM) templates to reuse repeated code and organize your projects. For example, you may have multiple Amazon API Gateway REST API resources that are described by an OpenAPI specification. Instead of replicating the OpenAPI specification code in your template, you can create one external file and reference it for each of your resources.
AWS Application Composer supports the following external file use cases:
-
API Gateway REST API resources defined by external OpenAPI specification files.
-
AWS Step Functions state machine resources defined by external state machine definition files.
To learn more about configuring external files for supported resources, see the following:
-
DefinitionBody
forAWS::Serverless::Api
. -
DefinitionUri
forAWS::Serverless::StateMachine
.
Note
To reference external files with Application Composer from the Application Composer console, you must use Application Composer in local sync mode. For more information, see Locally sync and save your project in the Application Composer console.
Topics
- Best practices for Application Composer external reference files
- Create an external file reference in Application Composer
- Load a project with an external file reference in Application Composer
- Create an application that references an external file in Application Composer
- Reference an OpenAPI specification external file