Serverless Template Formats
You can import existing projects or create new stacks in Stackery based on several types of serverless framework templates. This means that if you already have a repository with a valid template file (an application Blueprint), you can either import that repository directly, or create a new repository based on it.
Supported Template Formats
A serverless template describes the cloud resources AWS CloudFormation will provision when creating a stack. The template also defines relationships between resources, such as permissions for resources to interact with each other.
In Stackery, new stacks are created using the AWS SAM template format by default, though both AWS SAM and Serverless Framework formats are supported.
AWS Serverless Application Model (AWS SAM)
AWS SAM is an open-source template specification created by AWS. AWS SAM is supported directly by AWS CloudFormation, which allows the application's template flexibility while maintaining syntax consistency.
An AWS SAM stack is typically defined in a template.yaml
file saved in the root directory of your serverless project. Formatting rules for AWS SAM templates are specified in detail in the README of the AWS SAM repository.
For more information about using AWS SAM templates, see the AWS SAM docs.
Serverless Framework
The Serverless Framework is a tool created by Serverless Inc. that offers a simplified way to getting started with serverless resources, and relies on additional CloudFormation or third-party plug-in usage as the application grows.
The Serverless Framework has developed its own serverless template specification, which is defined in a serverless.yml
file.
For more information about using Serverless Framework templates, see the Serverless.yml Reference.
Adding Existing Projects
In the Dashboard
To import an existing project into Stackery, navigate to the Stacks page of the Stackery app, and click the Add a Stack button in the upper-right corner.
- Select your Git provider
- Name your stack
- For Repo Source, choose Use Existing Repo
- Enter the URL of the repo for Remote URL
- Click Add Stack
In the CLI
Alternatively, you can use the stackery create
CLI command with the flag --use-existing
to import a project using the command line:
stackery create -n my-existing-stack --blueprint-git-url https://github.com/stackery/my-existing-stack --use-existing