As we are now able to successfully invoke and test the function locally, we should be fine to deploy and test it remotely. First, we need to make sure that we have retrieved and exported the access and secret access keys as environment variables, as shown in the following code:
$ export AWS_ACCESS_KEY_ID=<access-key-id>$ export AWS_SECRET_ACCESS_KEY=<secret-key-id>
Now I am deploying the function and API to the AWS Cloud through a simple deploy command. Behind the scenes, the deployment process will create a .serverless folder with CloudFormation JSON templates. The serverless code is packaged into a .zip file and a serverless state JSON file. If we look into the create-stack JSON template, Serverless Framework ...