DevOps for Serverless Applications
上QQ阅读APP看书,第一时间看更新

Command-line library

The first JavaScript library is a command-line tool or library. The command-line tool helps to deploy, update, roll back, package, invoke or test, and destroy Lambda functions, and it also works seamlessly with AWS API Gateway. It uses the standard npm packaging conventions, which just means that you can call it without making changes to your actual code structure. So the really interesting features with ClaudiaJs's command-line library are as follows:

  • claudia create : This command will create a function and a related security role on the AWS portal
  • claudia update : This command will update the function by deploying a new version of the function and update the associated API 
  • claudia test-lambda: This command will execute the Lambda function 
  • claudia set-version: This command will point the Lambda API stage to the latest deployment version 
  • claudia add-scheduled-event: This command can add the scheduled recurring events for the Lambda function to run, so through this, we can keep the Lambda function warm 
  • claudia destroy: This command will destroy the function and associated API and security roles