Publishing to SAR

In this application, you'll learn how to publish your application to SAR.

Adding the Metadata section #

In addition to making it easy to use SAR components in your applications, SAM makes it very easy to publish an application directly to the SAR repository. Now, you’ll publish your work so far as a private application. You just need to add a bit of metadata about the application to the template. You can create a new top-level section called Metadata in template.yaml, with the code similar to the following listing (feel free to change the names).

Press + to interact
Metadata:
AWS::ServerlessRepo::Application:
Name: image-thumbnails
Description: >
A sample application for the Running Serverless book tutorial
Author: Gojko Adzic
SemanticVersion: 1.0.0
SpdxLicenseId: MIT
LicenseUrl: LICENSE.md
ReadmeUrl: README.md
Labels: ['layer', 'image', 'lambda', 'imagemagick']
HomePageUrl: https://runningserverless.com
SourceCodeUrl: https://runningserverless.com

Most parameters have obvious purposes. Here is a bit more information about the less obvious parameters:

  • SemanticVersion (line 7) is the version of the application. SAR allows you to publish multiple versions of a template, and clients can choose which version to install. Remember that you listed the application ID and the version when including the ImageMagick layer earlier in this chapter.
  • SpdxLicenseId (line 8) is the Software Package Data
...
Access this course and 1400+ top-rated courses and projects.