DEV Community

Cover image for AWS Serverless and Generative AI with Lambda and Bedrock!
Girish Bhatia
Girish Bhatia

Posted on

AWS Serverless and Generative AI with Lambda and Bedrock!

In May 2024, I published an article (linked below) about using AWS Serverless and Generative AI with Lambda and the Bedrock service to support a transcript summarization use case. It demonstrated how AWS Serverless enables rapid solution development without requiring any server setup or infrastructure management.

https://dev.to/bhatiagirish/create-call-center-transcript-summary-using-aws-bedrock-converse-api-and-lambda-anthropic-haiku-20cj

On December 3rd, 2024 (today), during the re:Invent 2024 keynote, AWS announced support for five additional models designed for Generative AI use cases across text, image, vision, and video. With these new additions, alongside Amazon Titan, there are now 13 Amazon models available via the Amazon Bedrock service to address diverse business use cases. This count doesn't even include the other third-party models Bedrock supports, such as Anthropic, Stable AI, Meta, and many others!

The five new models announced today are:

  • Amazon Nova Micro
  • Amazon Nova Lite
  • Amazon Nova Pro
  • Amazon Nova Canvas
  • Amazon Nova Reel

Excited about these advancements, I decided to update my previous API for transcript summarization to use one of the new Amazon Nova models. The entire update process took me about five minutes, showcasing the power of Amazon Bedrock and the AWS Serverless tech stack for quickly adopting new technologies and supporting diverse business use cases.

The API update did not require any changes to the API signature, ensuring zero impact on end users consuming the API. This backend model change was seamless and required no updates on the client side.

This seamless model update highlights the flexibility and efficiency of AWS Serverless and Bedrock, making it incredibly easy to try out cutting-edge technologies with minimal effort.

Here are the steps I followed to transition from a non-Nova model to an Amazon Nova model using the Amazon Bedrock service:

Request Access to Amazon Nova Micro

First, you need to request the access to the desired model, in my case, I requested access to Nova Micro. This process took less than 20 seconds.

Image nova

Update Model ID to be used by Bedrock Service

Amazon Bedrock requires a model ID as one of its parameters. I updated the model ID to use Amazon Nova Micro, as shown below:

- amazon.nova-micro-v1:0

Build the Code and Publish the API

After updating the model ID, I built the code and published the API. There were no changes to the API URL, ensuring continuity for users.

And that's it!

The API now leverages Amazon Nova for this Generative AI use case, enabling transcript summarization with the latest model.

Example of a Summary Using a Non-Nova Model:

Image nonnova

Example of a Summary Using the Nova Model:

Image nova

While I noticed that the API responded faster when using Amazon Nova, this experiment was not intended to test speed but to demonstrate how effortlessly the underlying model can be swapped using Amazon Bedrock and Serverless technologies. For this reason, I will not claim any performance comparison at this time.

In the coming days, I plan to explore the other Nova models announced today. Stay tuned for updates!

Thanks for reading!

π’’π’Ύπ“‡π’Ύπ“ˆπ’½ ℬ𝒽𝒢𝓉𝒾𝒢
𝘈𝘞𝘚 𝘊𝘦𝘳𝘡π˜ͺ𝘧π˜ͺ𝘦π˜₯ 𝘚𝘰𝘭𝘢𝘡π˜ͺ𝘰𝘯 𝘈𝘳𝘀𝘩π˜ͺ𝘡𝘦𝘀𝘡 & π˜‹π˜¦π˜·π˜¦π˜­π˜°π˜±π˜¦π˜³ 𝘈𝘴𝘴𝘰𝘀π˜ͺ𝘒𝘡𝘦
𝘊𝘭𝘰𝘢π˜₯ π˜›π˜¦π˜€π˜©π˜―π˜°π˜­π˜°π˜¨π˜Ί 𝘌𝘯𝘡𝘩𝘢𝘴π˜ͺ𝘒𝘴𝘡

Top comments (0)