- SAM CLI - Install the SAM CLI
- Python 3 installed
To build and deploy your application for the first time, run the following in your shell:
sam build
sam deploy --guided --stack-name ytwas
- Replace api url from output after
sam deploy
which will look like this:
API Gateway endpoint URL for Prod stage for ytwas function"
https://[IMPORTANT PART OF API URL IS HERE].execute-api.us-east-1.amazonaws.com/Prod/convert/"
NOTE
: This command works for all AWS Lambda functions; not just the ones you deploy using SAM.
ytwas$ sam logs -n YtwasFunction --stack-name ytwas --tail
You can find more information and examples about filtering Lambda function logs in the SAM CLI Documentation.
To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:
sam delete --stack-name ytwas
See the AWS SAM developer guide for an introduction to SAM specification, the SAM CLI, and serverless application concepts.
Next, you can use AWS Serverless Application Repository to deploy ready to use Apps that go beyond hello world samples and learn how authors developed their applications: AWS Serverless Application Repository main page