Next Steps
We've successfully deployed AWS Lambda functions using the Serverless Application Model for functions the use Cloudinary a helper function, Admin API and Upload API. Where do we go next?

Other Languages

Recall that when we initialized the SAM template we had a menu of languages from which to select. We're using nodejs12.x in the examples presented here, but there are many other languages available and the examples here could be transcribed to these other languages.
1 - nodejs12.x
2 - python3.8
3 - ruby2.7
4 - go1.x
5 - java11
6 - dotnetcore3.1
7 - nodejs10.x
8 - python3.7
9 - python3.6
10 - python2.7
11 - ruby2.5
12 - java8
13 - dotnetcore2.1

Other Starter Templates

We also made a template choice when initializing this project. The template we chose the first template, Hello World Example. The other template starters address more specific use cases.
One important use case for Cloudinary is uploading images from a form the is enctype="multipart/form-data"
There is a pattern for working with this kind of upload. Because images can be very large and we don't want to load them fully into function memory from the calling code, the pattern suggest that we upload to an S3 bucket. Then we configure a notification on the bucket to trigger the call of a lambda that receives the content of the bucket image. The trigger files on a configurable upload event. Then data about the image file is added to the event object sent to the Lambda. This can be converted to a base64 string and uploaded to Cloudinary using the Upload API. The Quick Start: S3 template can help with this.
1 - Hello World Example
2 - Step Functions Sample App (Stock Trader)
3 - Quick Start: From Scratch
4 - Quick Start: Scheduled Events
5 - Quick Start: S3
6 - Quick Start: SNS
7 - Quick Start: SQS
8 - Quick Start: Web Backend Template

Front End Integration

Serverless functions are especially helpful when working with SPA that are maintaining local state and interacting with services directly. However when services require credentials as the Admin API and the Upload API do, the SPA can't make those calls without exposing the credentials to the public. Setting up a lambda is streamlined way to provide access to credentialed services in a SPA. Note: If you provide access to services that mutate or query cloud data, place such access in authenticated pages.


Debugging is most easily available for Node.js using the console.log statement. Using Visual Studio Code we can configure more advanced debugging using breakpoints and step execution. Find information on how to set up this debugging in the AWS Documentation.


New tools for working with SAM have been released. For example, Stackery helps with the entire flow from design and development to testing and deployment.


We could set up automated testing. See this file for an example of how the unit test code might look: hello-world/tests/unit/test-handler.js.
Copy link
On this page
Other Languages
Other Starter Templates
Front End Integration