How to Deploy Applications - Amazon Serverless Application Repository
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

How to Deploy Applications

This section provides you with procedures for deploying serverless applications from the Amazon Serverless Application Repository by using the Amazon Web Services Management Console or the Amazon CLI.

Deploying a New Application (Console)

This section shows you how to deploy a new application from the Amazon Serverless Application Repository using the Amazon Web Services Management Console. For instructions on deploying a new version of an existing application, see Updating Applications.

Browsing, Searching, and Deploying Applications

Find, configure, and deploy an application in the Amazon Serverless Application Repository by using the following procedure.

To find and configure an application in the Amazon Serverless Application Repository
  1. Open the Amazon Serverless Application Repository public home page, or open the Amazon Lambda console. Choose Create function, and then choose Browse serverless app repository.

  2. Browse or search for an application.

    Note

    To show applications that contain custom IAM roles or resource policies, select the Show apps that create custom IAM roles or resource policies check box. For more information about custom IAM roles and resource policies, see Acknowledging Application Capabilities.

  3. Choose an application to view details such as its permissions, capabilities, and the number of times it has been deployed by Amazon customers.

    The deployment counts are shown for the Amazon Region that you're trying to deploy the application in.

  4. On the application detail page, view the application's permissions and application resources by viewing the Amazon SAM template, license, and readme file. On this page, you can also find the Source code URL link for applications that are publicly shared. If the application includes any nested applications, you can also view details of the nested applications on this page.

  5. Configure the application in the Application settings section. For guidance on configuring a particular application, see that application’s readme file.

    For example, configuration requirements might include specifying the name of a resource that you want the application to have access to. Such a resource might be an Amazon DynamoDB table, an Amazon S3 bucket, or an Amazon API Gateway API.

  6. Choose Deploy. Doing this takes you to the Deployment status page.

    Note

    If the application has capabilities that require acknowledgement, you must select the I acknowledge this application creates custom IAM roles or resource polices check box before deploying the application. Otherwise, an error will result. For more information about custom IAM roles and resource policies, see Acknowledging Application Capabilities.

  7. On the Deployment status page, you can view the progress of your deployment. While waiting for your deployment to complete, you can search and browse for other applications, and return to this page through the Lambda console.

After your application has been successfully deployed, you can review and manage the resources that have been created by using existing Amazon tools.

Deploying a New Application (Amazon CLI)

This section shows you how to deploy a new application from the Amazon Serverless Application Repository by using the Amazon CLI. For instructions on deploying a new version of an existing application, see Updating Applications.

Finding and Acknowledging Application Capabilities (Amazon CLI)

To acknowledge an application's capabilities using the Amazon CLI, follow these steps:

  1. Review the application's capabilities. Use the following Amazon CLI command to review an application's capabilities:

    aws serverlessrepo get-application \ --application-id application-arn

    The requiredCapabilities response property contains the list of application capabilities that you need to acknowledge before you can deploy the application. You can also use the GetApplication API in the Amazon SDKs to get this data.

  2. Create the changeset. You must provide the set of required capabilities when you create the Amazon CloudFormation changeset. For example, use the following Amazon CLI command to deploy an application by acknowledging its capabilities:

    aws serverlessrepo create-cloud-formation-change-set \ --application-id application-arn \ --stack-name unique-name-for-cloud-formation-stack \ --capabilities list-of-capabilities

    The changeset ID is returned when this command is successfully executed. You need the changeset ID for the next step. You can also use the CreateCloudFormationChangeSet API in the Amazon SDKs to create the changeset.

    For example, the following Amazon CLI command acknowledges an application that contains an AWS::IAM::Role resource with a custom name and one or more nested applications:

    aws serverlessrepo create-cloud-formation-change-set \ --application-id application-arn \ --stack-name unique-name-for-cloud-formation-stack \ --capabilities CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND
  3. Execute the changeset. Executing the changeset actually performs the deployment. Provide the changeset ID that was returned when you created the changeset in the previous step.

    The following example Amazon CLI command executes the application changeset to deploy the application:

    aws cloudformation execute-change-set \ --change-set-name changeset-id-arn

    You can also use the ExecuteChangeSet API in the Amazon SDKs to execute the changeset.

Deleting Application Stacks

To delete an application that you previously deployed using the Amazon Serverless Application Repository, follow the same procedure as for deleting an Amazon CloudFormation stack: