Publishing to SAR
In this application, you'll learn how to publish your application to SAR.
We'll cover the following...
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-thumbnailsDescription: >A sample application for the Running Serverless book tutorialAuthor: Gojko AdzicSemanticVersion: 1.0.0SpdxLicenseId: MITLicenseUrl: LICENSE.mdReadmeUrl: README.mdLabels: ['layer', 'image', 'lambda', 'imagemagick']HomePageUrl: https://runningserverless.comSourceCodeUrl: 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.