In a shell, navigate to the sample's folder and use the SAM CLI to build a deployable package
$ sam build
This command compiles the application and prepares a deployment package in the .aws-sam
sub-directory.
To deploy the application in your AWS account, you can use the SAM CLI's guided deployment process and follow the instructions on the screen
$ sam deploy --guided
Once the deployment is completed, the SAM CLI will print out the stack's outputs, including the new application URL. You can use curl
or a web browser to make a call to the URL
...
---------------------------------------------------------------------------------------------------------
OutputKey-Description OutputValue
---------------------------------------------------------------------------------------------------------
PetStoreApi - URL for application https://xxxxxxxxxx.execute-api.us-west-2.amazonaws.com/pets
---------------------------------------------------------------------------------------------------------
$ curl https://xxxxxxxxxx.execute-api.us-west-2.amazonaws.com/pets