iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📖

re:Invent 2025: Low-Latency Implementation of Sun Life's AWS Generative AI Solution, Iris

に公開
2025/12/10

Introduction

By transcribing various overseas lectures into Japanese articles, we aim to make hidden, high-quality information more accessible. The presentation featured in this project is as follows!

For transcription articles of re:Invent 2025, please check the information compiled in this Spreadsheet.

📖re:Invent 2025: AWS re:Invent 2025 - Accelerating AI: How Sun Life reduces latency and enhances engagement (IND3320)

This video explains "Iris," a generative AI solution built by Sun Life in collaboration with AWS Professional Services, leveraging Amazon Connect and Bedrock. To maintain user engagement during complex workflows, they adopted AWS AppSync's real-time streaming capabilities, achieving transparent progress updates even during processes taking over 30 seconds. Dennis Volovic explains the construction of a multi-agent collaborative concierge system on Amazon Connect, introducing the implementation of authentication agents and IT support agents utilizing the Model Context Protocol. Robert Chin explains the precise XML-based prompting methodology and the dynamic tool selection mechanism via MCP through a content generation and scoring platform called Content Assist. Walter Kurzatz provides a technical deep dive into the architecture, which leverages private APIs, GraphQL subscriptions, and cross-account resource sharing, as well as the secure implementation using SigV4 authentication.

https://www.youtube.com/watch?v=ag2EbZu5gUE
Please note that this article was automatically generated while maintaining the content of the original lecture to the greatest extent possible. Please be aware that there may be typos or incorrect information.

Main Content

Thumbnail 0

Session Start: Sun Life's Generative AI Solution "Iris" and Team Introduction

Welcome to IND3320, "Accelerating AI: How Sun Life Reduces Latency and Enhances Engagement." My name is Salman Moghal, and I am a Principal Consultant at AWS Professional Services. Today, I am joined on stage by three wonderful leaders and excellent colleagues from Sun Life. They will share their practical efforts in building generative AI applications, solutions, and architectures that maintain user engagement during complex workflows.

Thumbnail 40

We will have brief self-introductions from Sun Life. First is Robert Chin, the Product Owner of GenAI Patterns. To me, he is the original creator who started all of this and the person who democratized generative AI at Sun Life. He has built numerous generative AI technical patterns since early 2023. Dennis Volovic is the Director of the Contact Center and a Domain Enterprise Architect. He is building highly innovative multi-agent collaborative workflows within Amazon Connect, which he will explain today. And finally, Walter Kurzatz, a Senior Principal Engineer, is the mastermind who designs and operates Sun Life's generative AI patterns in a strictly regulated and secure environment.

Interestingly, this team recently built an omnichannel generative AI solution codenamed Iris using Amazon Connect and Bedrock. This solution recently won several CIO awards. So, if you want to hear about how this team actually deployed this solution into production, please feel free to reach out to them later. We have a lot of content to cover. I know this is the last presentation before you head out, but please stick with us. There is a lot to cover.

Thumbnail 120

Now, here is today's agenda. First, I will briefly explain the evolution of enterprise AI and the interesting and unique challenges this evolution has brought. Dennis will explain how he and his team are building a highly innovative agentic concierge-like system within Amazon Connect. They are accelerating AI adoption within the Amazon Contact Center. Rob will introduce Content Assist, a content generation and scoring platform within Sun Life. And finally, Walter will provide a deep dive into the architecture and demo.

Thumbnail 170

The Evolution of Enterprise AI and New Challenges: Complex Workflows and User Engagement

Now, let's talk about enterprise AI and how this evolution has brought about interesting new challenges. We have witnessed the emergence, or the dawn, of RAG systems and RAG workflows. These are Retrieval Augmented Generation systems. They are single-step solutions. I call them single-step because there is only one round-trip to Bedrock or large language models to generate content, and much human monitoring is involved. Recently, deterministic agents have appeared that automate multi-step or multi-task workflows. These are still actively developed and used by small and large enterprises. Furthermore, autonomous agents have emerged. These are multi-step agentic workflows with diverse toolsets. They can truly mimic human reasoning and capabilities. And now, we are beginning to see agentic virtual workers that can truly collaborate between teams across the entire organization.

Thumbnail 240

This evolution has brought wonderful business value and unlocked many possibilities, but it has also triggered many interesting challenges. I will talk about those now. So, here is the first one. On the left, a simple Q&A chatbot is shown. This works perfectly. You get an immediate answer. Users are usually very satisfied with this immediate response. However, on the right, a more complex workflow is shown. This is Content Assist, which Rob will explain, and it is located on the right side of the spectrum we saw in the previous slide. These are deterministic workflows moving toward autonomy.

Analyzing guidelines, generating drafts, and refining the output—these intelligent steps take time. They can take 30 seconds, 60 seconds, or even longer. So, what is the problem here? It is the response, isn't it? Users expect immediate responses. Seeing spinners or three-dot animations makes them think the system is not working. Meanwhile, in the background, the AI is working perfectly, it just takes time to respond. In other words, this is not a technical problem, but a user experience problem.

Thumbnail 300

The Advent of the Model Context Protocol and Accelerated Agentic System Construction

And without a doubt, 2025 has become the year of the Model Context Protocol (MCP).

This has acted as a catalyst, accelerating the construction of these agentic systems. It is often compared to the USB-C port for agentic AI systems, providing a standardized way to connect to tools and data sources in the background. Suddenly, with the help of MCP, it has become very easy for enterprises to build these autonomous agents, but there are always pitfalls, right?

The pitfall is that while you can build these things very quickly, executing agentic workflows takes time. This truly amplified the challenges we saw earlier. And as more companies adopt intelligent agents through MCP, keeping users engaged with the system becomes crucial. So, how can we solve this challenge? How do we keep users engaged during long-running AI workflows?

Thumbnail 360

Real-Time Streaming Solution with AWS AppSync: Security and Asynchronous Patterns

Well, as you all probably expected, and as you may have addressed at some point, streaming or real-time updates is the way to go. For those of you following the many announcements at re:Invent, there was a recent announcement that Amazon API Gateway now natively supports streaming. If you want to go down that bold path, you can build your own WebSocket servers, but scaling those servers is difficult. Therefore, for enterprises, managed services that provide secure, necessary features from the start are crucial, which is why AppSync is a better choice.

AppSync provides three key features. First, flexible security through private APIs. This means traffic never leaves the VPC and is always kept secure internally. Second, request processing. It offers flexible request processing and can stream these real-time updates to the frontend. It also allows the use of resolvers. For those who don't know what AppSync is, we can talk about that later. You can use these features to modify request and response resolvers. And third, flexible evolution of API models. As you can imagine, as we add more data points and connections to the backend, consumers are using the API. GraphQL has built-in features ensuring that backend changes do not actually affect consumers.

Another key feature enabling streaming is GraphQL subscriptions. Since this is done via managed WebSockets, AppSync provides all these capabilities in a managed and more secure way. To talk a bit more about security, for highly regulated customers like Sun Life, security is paramount. AppSync provides this private API accessibility, accessible only from the VPC via PrivateLink. With controls at every level, you can use various things like IAM policies, endpoint policies, and security groups. This is what Sun Life is using in the background.

Another key feature of AppSync is Resource Access Manager (RAM) sharing, which allows you to share APIs across multiple accounts. In highly regulated environments where you need to manage multiple accounts, you can share APIs across accounts. Usually, access to the cloud is permitted only through foundational or network accounts, so you can share workload APIs to this foundational account and access them through its VPC endpoints. Walter will dive deeper into this in his section.

Thumbnail 540

Thumbnail 560

Now, let's talk about a few patterns. For simple Q&A bots, AppSync calls Bedrock using built-in features. These are data sources. In other words, there is a Bedrock data source. If you bring your context and prompts and call AppSync, it works. This is suitable for simple workflows and works very well. However, more complex workflows requiring long execution times need different patterns. And this is the asynchronous pattern of AppSync we talked about. This applies to the right side of the spectrum for long-running AI workflows.

Users make requests. They use AppSync mutations or queries to start a backend workflow. At the same time, the application subscribes. AppSync calls a Lambda function, and the Lambda function performs orchestration between the MCP server and Bedrock. And the MCP server provides a standard set of tools, APIs, and databases to the orchestrator. Then, streaming begins. As the AI orchestrator executes these multi-step processes, it becomes able to start returning that data to the frontend or API consumers via streaming.

In other words, the 32-second duration turns into a more engaging, transparent, and explainable experience. This pattern is applicable to any long-running workflow. This is AI orchestration via UX.

Thumbnail 630

Transforming Contact Centers via Multi-Agent Collaboration and Realizing Self-Service

Sun Life also leveraged multi-agent orchestration in the contact center. By doing so, they eliminated dial tones like "press 1," "press 2," and realized a very smart concierge system that understands user utterances better than traditional embedded NLP intents. Dennis will talk about this in detail later, but this concierge routes requests to specialized sub-agents. It could be an authentication agent that verifies or authenticates the user. It could be an IT support agent that can handle password reset requests. And it could be a set of all kinds of specialized sub-agents that can handle billing or benefits-type requests. The important thing is to manage this response time when building these multiple agents. What you are seeing here is an example of an agentic virtual worker. This is the realization of complete self-service through multi-agent collaboration.

To summarize, MCP enables agentic workflows. AppSync accelerates AI through real-time streaming. Contact centers or Amazon Connect accelerate through voice and conversational concierge systems. Sun Life uses both. As a result, they have achieved better UX, faster AI, and more engaged users. To dive deeper into the self-service contact use case, I would like to invite Dennis Volovic to the stage. Please press the green button.

Thumbnail 720

Thumbnail 750

Conversational IVR Experience with Amazon Connect and Lex: From Menus to Natural Dialogue

Now, hello. My name is Dennis Volovic. I serve as the Domain Enterprise Architect for contact centers at Sun Life. This re:Invent has been wonderful. I'm trying to catch up with all the announcements. I look forward to trying out the 29 new features announced regarding Amazon Connect. Before we begin, for those who don't know Sun Life, we are an international financial services organization, and our purpose is to help clients achieve lifelong financial security and live healthier lives.

Imagine this: you call customer service, and within seconds, a real conversation begins. No menus, no "press 1 for this," "press 2 for that," no need to repeat your account number three times, just natural dialogue that actually solves your problem. This might sound too good to be true. I will show you how to transform from menus to a conversational IVR, move beyond keywords, and create a concierge-like experience through natural dialogue that understands context, intent, and nuance. From there, we move to digital assistants that allow customers to solve problems independently through AI-guided interactions. And through conversational digital assistants, we can start to balance the friction typically faced in tasks like authentication.

Thumbnail 810

Contact centers are where AI truly shines and can transform IVR experiences. The question is, where to start? We have been working with Amazon Connect for several years, and as we navigate the journey from tone dials to deterministic agents, we are thoughtful and responsible in testing and learning to ensure we focus on the right outcomes and experiences for our customers. The solution options I will introduce helped us improve service quality while incrementally enhancing the customer experience on IVR.

First, I will talk about Amazon Connect and Amazon Lex. This is how we enable voice recognition and natural language understanding on IVR. Next, I will introduce services like Bedrock and EKS. These use large language models and the Model Context Protocol to enhance the Connect experience, providing more context-aware, multi-turn memory, and dynamic dialogue. You will see that there is a path to deterministic agents, and that we can provide value to customers along the way.

Thumbnail 880

Let's start by talking about voice-driven experiences. This is a very good alternative. Customers will appreciate being able to express themselves in words. This solution uses Amazon Lex. I know there have been many announcements regarding Connect AI agents, but Lex remains as a scaffold between Connect and those AI agents, and understanding it remains an important concept and a key enabling factor for Nova Sonic.

For those unfamiliar with Amazon Connect, it is AWS's customer service platform, and Amazon Lex is a builder for conversational interfaces. So, what is a Lex bot? Bots are composed of intents. These are actions the customer wants to take, such as asking about claim status or asking how much the compensation is. Utterances are the ways customers express those questions, for example, "What am I compensated for?"

So, how does Lex respond? Lex can respond directly from the intent. Answers that don't change can be put directly into the intent, and Lex will respond. Also, you can respond using slots. Slots are how Lex collects additional information. In the compensation example I mentioned earlier, Lex might present a slot and ask, "Is it about medical compensation or dental compensation?" Finally, if you want to perform customizations, you can introduce Lambda. Lambda gives you the opportunity to create more personalized responses, like connecting to an API. Returning to the dental compensation example, you would want to personalize the response so that the customer knows exactly how much compensation they will receive before going to the dentist. One last point about Lambda: you can only have one per Lex bot.

Next, let's focus on Amazon Connect. Amazon Connect is where you build IVR experiences. For those who haven't seen it, there is a contact flow designer. This is like a canvas where you drop blocks and connect them with arrows, which is essentially the journey the customer takes on IVR. Looking at the flow shown here, we are using Connect session attributes and contact attributes to manage the journey in this architecture. When Lex returns something, we use those session attributes, and use the results together to navigate the user through the IVR.

Let's see what's happening here. There are three Lex bots. When a customer calls, you might want to present a menu bot to allow the customer to express why they called. If the result of calling the menu bot is that the customer wants to know the compensation amount, you might end up showing a self-service bot to resolve that inquiry. Another valid result from the menu bot could be that you need to put them in a queue to talk to an agent. And while waiting in the queue, you might want to show an authentication bot to collect additional information while they wait.

Thumbnail 1110

So, there are many options here. You could also consolidate all Lex bots into one. These are really architectural decisions about how you want to develop the customer experience. Again, this solution has good benefits; it eliminates menu frustration, introduces natural language understanding, and because Lex has a structured nature, the results customers get are very clear. While this solution provides value, some challenges remain if you want to realize a more conversational experience.

Extending Lex with Large Language Models and MCP: Building Deterministic Agents

Due to recent advances in Generative AI, some compelling solution options have emerged, and I will explain them. One is that it is very convenient to be able to extend Lex with large language models and prompts when scaling highly configured experiences built with Lex. In the integration we saw in the diagram earlier, there was Lex, Lambda, and all the API calls. This is very tied to Lex's implementation and feels specific to the use case. Salman mentioned the changes earlier, and mentioned the Model Context Protocol. Now, using these large language models that have extended Lex, you can suddenly discover tools on the MCP server. The final challenge is how to manage user experience and state. This is much easier to solve using large language models. Orchestration frameworks like LangChain or Strands have hooks that make implementing session management and conversation history much easier.

Thumbnail 1180

Now, I will explain the solution architecture and tell you how to level up the previous design to be more conversational. In this architecture, Lex continues to be the gateway. When I talked about Lex in the previous architecture, I explained its design method, intent mechanism, and utterance mechanism. The basic idea is that when a customer says something, Lex matches it to an intent and responds.

However, what I didn't talk about is what happens when Lex doesn't understand. There is another intent called a fallback intent, which is basically Lex's catch-all, allowing you to create responses like "Sorry, I didn't understand. Could you rephrase your question?" So, why mention this? The reason is that the Lex bot in this architecture has absolutely no intents. All it has is a fallback intent. In other words, when a customer is speaking, it passes through Lex, falls back, and goes straight to Lambda. This is where the next big change in this approach appears.

Using the standard MCP client SDK, we essentially convert Lambda into an MCP client so it can call an MCP server hosted on Amazon EKS. Once the process starts, Lambda performs a fetch. It makes resource calls to the MCP server to get the necessary configuration elements. It also gets the prompts needed to drive the orchestration. You can see that there is also Amazon Bedrock in the diagram. We get the large language model there. You can pass it to the large language model using the prompt you just fetched, and the large language model will be able to discover the necessary tools and start orchestrating the authentication flow.

Another new point is DynamoDB, which we are using for session and conversation history management. We could have used Amazon S3. What is not reflected here is LangChain and LangGraph, which are our orchestration frameworks, and as a result, the persistence layer is implemented using the checkpointing that comes with it.

Now, let's look at the MCP server. When we first started this, the agent core was not yet ready, and one of the things we were considering for speed was trying to convert Lambda into an MCP server. However, due to Lambda's stateless nature and the fact that it exits immediately, we decided against it. This is because the MCP protocol operates asynchronously and is stateful. If we were to use Lambda, we would have had to rebuild our own persistence layer in DynamoDB or S3 to be able to rewrite those session IDs. So, we chose containerization. This is because it gives us a persistent, long-running mechanism. Another point is that the MCP protocol using session stickiness works perfectly for us.

One more thing about the MCP server. We are scaling the MCP server container using FastMCP and multi-threading. And when the workload increases, Amazon EKS handles horizontal scaling. Looking inside the MCP server, you can see there are several servers. One is an authentication server, where we store prompts. And there are several tools, such as a user ID tool for verifying user IDs, and an OTP tool for sending a one-time passcode to someone's mobile phone for verification. We also have a knowledge base MCP server.

Thumbnail 1420

Now, let's talk about how this flow is orchestrated. Before going into prompt engineering, let's talk about what makes a deterministic agent. In our authentication scenario, we need the same predictable output for a given input every time. It shouldn't happen that the LLM decides the user ID is good one day, and not good another day, or worse, that someone can bypass it completely. Therefore, the agent operates based on a set of predefined rules, and by utilizing MCP tools for lowering temperature, structured JSON output, and standard responses, we need to make the output of the large language model more deterministic.

Multi-Agent Orchestration via Prompt Engineering: From Concierge to Authentication Agent

I mentioned creating a concierge experience earlier, and to realize this, we are utilizing prompts that provide multi-agent orchestration. The concierge is also deterministic. It needs to properly understand the customer's intent and know when to route to a human or hand over to another agent. The concierge prompt has its own persona definition. It has its own instructions and confidence logic. It needs to know when to route or ask clarifying questions. It also has retry logic.

When the concierge finishes the job of understanding the intent, it may decide that it needs to call an authentication service to realize it. Here, we perform multi-agent orchestration and introduce an authentication agent.

This also has its own persona definition and its own step-by-step deterministic workflow. We have all experienced authentication. There is a clear set of steps. Since we need to resolve the ID and then move on to the next element like OTP, we need to ensure that the flow we create in the prompt is very step-by-step and deterministic. And of course, there is tool discovery.

Another great thing about the authentication agent is that it doesn't work in dual mode. In the first mode, the agent decides the next step, and in the other mode, Lex collects input through the slots explained in the previous slide. And because there is a structured JSON output, seamless switching between these two modes becomes possible. When you extend the Connect experience with large language models and MCP servers, prompt engineering opens up many possibilities, and you can expand this in infinite directions.

Thumbnail 1600

I hope you have understood that there is a path from touch-tone to deterministic agents, and much value is obtained in that process. Before moving on to the next speaker, thank you for participating. And I hope we have provided some ideas on how to accelerate AI in your contact centers and transform your IVR experience. Now, I will pass it over to Rob. He will talk about Content Assist and another creative use case for MCP. Thank you.

Content Assist: High-Quality Content Generation Platform via Precise Prompting and MCP

Well, thank you, Dennis. I never thought I would be talking about content on a re:Invent stage, but content seems to be everywhere. Social media, email blasts, everyone has content for Instagram, TikTok, and Facebook. The problem with content is that it is hard to create. Everyone hates creating documents, but creating content is really tough. So, the concept was born: can we make it easier with GenAI? And that is exactly where we are heading. With various use cases for content, how can we make things easier?

As Salman mentioned, I am Rob Chin, Product Owner of GenAI Patterns, and I started the GenAI journey with Salman around 2023. At that time, there wasn't even an AWS GenAI blog to learn from. There were no GenAI services, and now it would be quite hard to find a session that doesn't include GenAI or Bedrock. I remember when Bedrock started to be released in 2023, Google search would say Bedrock was the hometown of the Flintstones. But now there is Claude, so if you don't know the Flintstones, you can ask Claude who lives in the town of Bedrock, and it will give you a funny answer.

Thumbnail 1690

Now, let's get into Content Assist. Content Assist started from the fact that GenAI is excellent at content generation. So, couldn't we design a solution that leverages large language models to assist in content creation, scoring, and even rewriting? And should we limit ourselves? Large language models don't really know what kind of content they are creating. So, you can use it for marketing, custom summaries, documents, and even responses to RFPs. If you guide it, it can definitely do it. That was what Content Assist aimed for.

Our solution leverages Amazon Bedrock. One of the models we like to use, and many people in this room probably do too, is Claude by Anthropic, which is one of the leading models for content creation. The goal of this solution is to generate high-quality content through precise prompting. Precise prompting, the power of prompts—everything depends on the quality of the prompt to generate high-quality output. I will talk a bit about this later.

And about prompting for content—if you ask who knows content best, it's the subject matter expert, right? As we go along, you will see that content creation is actually a collaboration between technical teams and business teams. Because I personally have almost no knowledge of content. However, if we can provide a foundation like Content Assist to move this content creation forward, that is what we are aiming for. For today's demo, I've always wanted my own mock company, so I created PurrfectFrame Studios. This is a company specializing in creating premium cat videos, and everyone loves cat videos, so I will be using PurrfectFrame Studios from now on.

Thumbnail 1800

What you are looking at here is a preview. I will do the demo later. This is a preview of content created for Instagram for PurrfectFrame Studios, which we will look at now. Content Assist was never developed overnight. It was a very iterative process.

It started in 2024 with a few curious users. What I noticed about Generative AI is that curiosity is the driving force that moves ideas forward. There were people using one-line prompts like "Create an Instagram post for PurrfectFrame Studios," and that worked really well. They were happy with the results, but as time went on, the content started looking very generic. There was no brand tone or brand voice that everyone was accustomed to in content creation.

Then we started working together—the IT team and Amazon's Professional Services—and started creating prompt templates that we could hand over to the business side. By doing so, they could start incorporating brand guidelines and brand voice that they knew as experts. We started creating these complex and more precise prompts, and they were generating really great content. It was so great that many use cases started coming in. Business groups were filling out these templates and creating great prompts, so we started accumulating many prompts that were being shared and used by people. We put them into an internal tool similar to ChatGPT. If you input prompts and content there, it connects to Bedrock and generates content.

The key to getting high-quality content is to be very clear and detailed in your prompts. As we go along, I will cover a few prompting styles. However, as these prompts kept increasing, we created a UX wrapper around them. For example, if a marketer wants to create an Instagram post, they go into the system, select the desired category, and it fetches predefined prompts from the backend to create content.

Then we thought about where else we could introduce this. From a frontend perspective, we chose Web UI first, but this can easily be extended to other channels. Slack, Microsoft Teams, or Microsoft Add-ins, for example. I think the key for general generative AI solutions like this is to build the solution as modularly as possible. Because you never know where the next technology platform will be. We started small, moved quickly within our own tools, and then put prompts into Lambda, into UX, and everything was made very modular, so nothing was lost.

Thumbnail 1950

Now, I talked about precise prompting, and you are probably wondering what kind of magical prompts we use to get this high-quality output. I will explain a few points we considered. As you can see, the brand guidelines we incorporated are housed within an XML structure. In a model like Claude, by using XML structures, things are kept in a very organized state. Therefore, when you start referencing these areas within prompts, Claude can keep a very focused state. So, in this particular case, if you can structure brand guidelines in XML format, you want to create marketing posts that are professional, thoughtful, and in plain language.

Thumbnail 1980

Thumbnail 2000

We can talk about good examples and bad examples of brands, but these are very important. As a bad example, "Even if your cat has an attitude problem, don't worry. We can handle difficult talents" is not a very good example. But how about "It is completely normal that your cat needs a little time to get used to it"? Such examples are really helpful as guidelines for the model when creating content. There are other guidelines that can be incorporated. As you can see when looking at this content, I mentioned that prompting is becoming a new development language. You might have noticed that everything here is actually business-driven by content experts. In other words, a shift from technical development to the business side is starting. Now, business is driving much of the content generation logic, and we are providing the foundation and content assist to enable them.

Thumbnail 2040

In this case, you can include anything the marketing team wants to promote, such as a call to action. This is a very iterative process. If you don't get the right output, review the prompt and add more details. Regarding the output format for this specific case, we are asking for an actual post, but another thing we are asking for is reasoning. This reasoning is very important. This is because when these models generate content, they use your guidelines, but when a human gets into the loop to review, the LLM actually explains, "I wrote it because you said so," so that you can understand why it wrote the marketing post in a certain way. And in many cases, it hits the mark. Because your guidelines were not specific enough. Then you can go back and start adjusting. So, please write specifically.

Thumbnail 2070

Thumbnail 2100

And finally, we convey precisely step-by-step to the LLM what we want it to do as we go along. And if the LLM doesn't act as expected and starts drifting, we just keep adding instructions. In this way, when we incorporate all these sections into a global prompt, it now becomes a complex prompt that is 5 to 10 pages long, and this produces really good results, but challenges also arise. Complex prompts take time to execute. This is as expected, right? To get quality, it takes time.

Executing these complex prompts sometimes took up to a minute. Users can't stand that. Nobody likes to wait, right? They switch screens, read emails, go to another chat, and sometimes they don't come back. To improve this, we considered a streaming solution so that we can keep clients engaged. So we introduced AppSync. Salman touched on it a little, and Walter will explain it. As soon as Bedrock starts creating content, streaming begins, you get that scrolling effect, and you get a response almost immediately.

As the second challenge, I talked about this huge library of complex prompts. The question was what to do with it. There was a UI in the front, and the model was like, if this, then that; if you do this post, choose this prompt. And thankfully, MCP appeared, and the opportunity to build a dynamic prompt library really opened up. The concept we are considering is putting all prompts into an MCP catalog so that we can tell the server what we want to do. If we do that, it will select prompts on the backend, and we will get a quite deterministic output. If we put enough detail into what each prompt does, it will start choosing the right tool. Salman touched on MCP being an enabler for building these deterministic agents, but I think this phased approach we have taken with Content Assist is moving us even further along the path to full autonomy. We are not there yet, but we are moving further along the path.

Thumbnail 2210

Thumbnail 2220

When I first started talking about LLM and MCP, it was a bit difficult for me to understand at first. The whole concept that LLM could think like a human, that is. So, I would like to share a simple analogy I thought of. This is like a small experiment you can try on Claude AI if you want to understand the connection between LLM, tools, and MCP. As everyone knows, when you start moving to agentic things, it becomes very goal-oriented. You just want to explain what the problem is and have the LLM solve it. In this specific example, let's say you want to create an engaging social media marketing post about a specific topic.

Thumbnail 2240

Thumbnail 2250

So, we start by providing a list of tools. Salman and Dennis talked about that, right? In this case, brand guidelines, content examples, social media posting trends, and as random tools, a hammer, a lawnmower, and of course, an Instant Pot. I provided this list of tools to the LLM. The LLM knew what it wanted to do and asked me which tool to choose. Then it actually told me it would choose guidelines, examples, and social media trends, and actually told me it excluded the hammer, lawnmower, and Instant Pot. Now I know which tool it selected.

Thumbnail 2270

And I ask how it intends to use these tools. Without giving any instructions. Then it actually creates a step-by-step guide on what it intends to do. I didn't need to give any instructions. Based solely on that knowledge and thinking ability, it taught me step-by-step. Start with the guidelines, look at the examples, understand the trends, draft the post, and so on. It provided more details, reviewed, rewrote, and presented it with reasons.

So, I hope you can understand how this starts to form next-generation agentic workflows. If you can start initiating more activity on the backend, you might want to create it, start sending it by email to a distribution list, put it on SharePoint, or put it into a workflow. You can start creating these different steps. And the wonderful thing about using MCP is that if you start adding more tools, for example, if you build a library of how our social media posts are performing and put it into a simple SharePoint with descriptions for each post, you can actually have a tool that performs standard RAG approaches and pull out the latest details. If a cat video in the snow is trending well, you can pull that in as a good example. And you can start creating dynamic examples in the content creation process.

In other words, there is a huge opportunity in MCP. And as I said earlier, by building modularly, you can drop it in, and other groups might use those tools too. The LLM decides, and as Dennis said, you want to start publishing them like the concierge approach. You will have a lot of tools there, and you want the concierge to help you understand which one to use. In the hotel example, if a new restaurant opened and is selling pizza, it would suggest, "Hey, Rob, there's a pizza shop there, do you want to go?" So, you can publish it dynamically, and the LLM will start to help you with things, like a concierge.

The problem with presenting on a Thursday session is that there are so many new releases at re:Invent. So we updated some of the slides. Those who attended Swami's session will remember he talked about Agent Corp. You might think there are many opportunities for Content Assist, and that is certainly true. There is semantic search to find the right tools, and policies and evaluations to check if these agents are working or doing a good job.

And episodic memory was interesting. If something went off the rails in some quarter, for example, let's say you created a really failed cat video. Episodic memory reminds you when you start creating something, "Hey, we had a good idea last year but it failed, don't go there." So, I think all these things coming into the agentic core will become very big as we move forward with Content Assist.

Thumbnail 2460

Architectural Deep Dive: Integrated Design of AppSync Streaming, Lambda, and MCP Server

Now, I've talked about how all of this works together, but a lot is happening on the backend. Walter will talk about the technology and architecture behind it. There are many steps, but I will pass it over to Walter. Thank you. Dennis and Robert, thank you. That was a wonderful background explanation. In this section, we will delve deeper into how we use AWS AppSync to accelerate solutions and reduce latency. We will explore how real-time streaming transformed the user experience and turned long wait times into interactive and transparent progress updates. And I will explain the architecture and key design decisions.

Thumbnail 2520

My name is Walter Kurzatz. I am a senior principal software engineer at Sun Life. I led the engineering efforts behind the AppSync implementation and worked closely with the engineering team to design and deliver a solution that meets robust enterprise requirements. Today, I will show you an architecture that leverages AppSync's managed GraphQL service, private APIs, and real-time streaming to support complex, long-running workflows. You will see how we integrate AppSync with Amazon Bedrock, Lambda, and Model Context Protocol servers to orchestrate multi-step processes. Well, Rob will guide you through a demo later, and show you the solution streaming progress updates in real-time. Instead of loading spinners and uncertainty, you will see updates actually happening.

Thumbnail 2540

The complexity of generative AI workflows and the lack of scalable streaming infrastructure were some of the hurdles we had to overcome. As we moved forward with generative AI initiatives, we faced several key challenges that shaped our approach. And as use cases became more complex, the complexity of context increased dramatically, requiring significantly more time to complete. As Rob mentioned, the second challenge was user experience. Our users were used to immediate responses, and complex reasoning and long wait times created a real risk that users would abandon the session.

Thumbnail 2580

Thumbnail 2600

Now, let's start with an overview of the architecture, and then move on to a demo to see AppSync streaming in action. In this slide, I will explain the key components and technologies of the AppSync solution. The UI is written in React JS and leverages the Apollo TypeScript client library to manage GraphQL subscriptions, queries, and mutations. For networking and hosting, we leverage OpenShift and Kubernetes for container and orchestration management. There, we have implemented a secure gateway to access Lambda functions. We implemented NGINX acting as a reverse proxy to manage WebSocket connections. And finally, the MCP server is also implemented as a container.

Thumbnail 2630

Thumbnail 2650

We also leverage AWS Identity and Access Management. We implemented an invoke role to allow access to AppSync within the network account. And we use STS to actually perform assume role in that network account, which allows us to obtain temporary credentials to access AppSync itself. As Salman mentioned, regarding AWS Resource Access Manager, we implemented it to enable AppSync cross-account resource sharing. AppSync is implemented in two places: the network or foundation account and the private workload account.

Thumbnail 2670

Thumbnail 2680

And of course, AWS AppSync itself is a fully managed GraphQL service, and in our solution, we leverage it for real-time streaming. AWS Lambda is serverless computing, but we leverage it to implement backend approaches and backend strategies. There are three Lambda functions: the API Lambda, which we use to perform assume role in the network account. We use the data source Lambda, which acts as an intermediate layer processing GraphQL requests.

Thumbnail 2720

Thumbnail 2740

Thumbnail 2750

And finally, there is the Lambda Orchestrator, which really wraps everything together, connecting to SNS, Bedrock, and AppSync. And of course, this is our MCP host and client. We use SNS for secure pub and sub notifications. In this case, the data source Lambda publishes to SNS, and the Lambda Orchestrator subscribes to it. We leverage AWS Bedrock for LLM integration, and we also use streaming APIs, which we use to actually write back to AppSync mutations. And finally, Model Context Protocol, which we use for system prompt hosting and content scoring tools.

Thumbnail 2810

So, let's look at step 1. In step 1, the user, i.e., the UI, sends a request to the backend Lambda through a secure gateway and obtains temporary credentials. These credentials allow the UI to send requests to the shared AppSync endpoint located in the network account. The Lambda function uses AWS STS to assume an IAM role in the network account. The network account's IAM role trusts the Lambda's execution role and grants permission to call AppSync. Note here that we are using SigV4 in the header. This is necessary for AppSync. AppSync uses this to perform authorization and authentication. At the time we created this solution, there were no other mechanisms for authentication and authorization, so we had to use SigV4 headers.

Thumbnail 2850

Therefore, when the UI connects to AppSync, especially for real-time subscriptions via WebSockets, you need to sign the initial handshake using SigV4 headers. This signature proves that the request is authorized using temporary credentials obtained via Lambda and cross-account role assume. The UI uses the Apollo library, and in step 2, it uses the Apollo library to connect to AppSync and subscribe to events. A WebSocket connection signed with SigV4 headers is prepared, and it is passed as a query parameter of the WebSocket URL. The WebSocket connection is established through an NGINX reverse proxy. The reverse proxy accepts the WebSocket upgrade request and then forwards the WebSocket connection to the AppSync endpoint in the network account.

Thumbnail 2880

Thumbnail 2900

Thumbnail 2910

AppSync in the network account verifies the SigV4 signature and temporary credentials, and forwards the request to the private AppSync instance. AppSync establishes the subscription and enables real-time data streaming back to the client via the WebSocket connection. And finally, a small note: subscriptions in GraphQL are a way for clients to receive real-time updates from the server when specific events or data changes occur. So, instead of repeatedly polling for specific events or data streams, you can receive immediate notifications when something happens.

Thumbnail 2930

Now, regarding AWS AppSync, in AWS AppSync, GraphQL subscriptions are defined within the schema and usually use a NONE data source. This allows you to perform custom logic or transformations without connecting to a backend. In a multi-account configuration, subscription requests are safely forwarded to a private AppSync instance, where they process events and stream updates back to the client in real-time via WebSockets. This approach allows you to achieve instant, event-driven feedback while protecting backend resources.

Thumbnail 2970

Thumbnail 2980

Thumbnail 3000

And step 2, it seems one of the slides went a bit wrong. In step 2, the UI connects to AppSync using the Apollo library and subscribes to events. It prepares the WebSocket connection. So, let's move on to the next section.

Thumbnail 3020

Thumbnail 3030

Users send GraphQL queries through the established WebSocket connection. The request is routed via the NGINX reverse proxy, which then forwards the request to the WebSocket. AppSync within the network account receives the query, verifies the SigV4 signature and temporary credentials, and routes the request to the appropriate API and resolver. In this case, the resolver is getContentResponse.

Thumbnail 3060

Thumbnail 3080

The resolver converts the GraphQL query into a payload for the data source Lambda, and then calls the Lambda itself. The data source Lambda receives the payload, processes it, and publishes to an SNS topic fire-and-forget style. Finally, the LLM orchestrator Lambda subscribes to that topic, and when triggered, it receives the payload and calls the Bedrock LLM streaming API. The orchestrator Lambda streams tokens from Bedrock, buffers them, and sends the generated updates back to AppSync. So, how is this done?

Thumbnail 3090

Thumbnail 3130

A mutation called sendMessage is defined in the AppSync schema and mapped to use a resolver. This is also set as a NONE data source. The resolver acts as a correlation ID mechanism, ensuring that the correct client receives the mutation before returning a response to the WebSocket connection. Finally, how is MCP incorporated into our solution? The user provides basic context and requests social media content. Then, the LLM connects to the MCP server via Server-Sent Events transport.

Thumbnail 3170

The server notifies what is available, available prompts, and available tools. Then the Lambda orchestrator requests a system prompt. This system prompt instructs the LLM to execute a scoring tool from the list of available tools after the content is actually generated. Next, the LLM generates social media content based on the system prompt, and finally, the LLM calls the MCP scoring tool according to the system prompt instructions. The Lambda orchestrator streams the scoring results back to the UI.

Live Demo and Lessons Learned: Content Generation Demonstration at PurrfectFrame Studios

In the next step, I'd like to show you a demo of all this working in practice. So Walter, thank you. Now, you have seen the crazy technical parts, so I will show you the simple part I am looking at, the frontend. In this demo, I talked about a fictional cat videography company that provides premium cat photography and video production services. We go to your cat. You don't need to bring the cat.

Thumbnail 3210

In this promotion, we are launching a new winter holiday photo pack for customers with multiple cats. It is 15% off for each additional cat. It is a perfect gift idea for that hard-to-shop-for cat-loving friend. This is Content Assist. Let's try it. The right screen is the screen that actually displays AppSync streaming, and the left side is the legacy version that used to work before.

Thumbnail 3230

Thumbnail 3240

Thumbnail 3250

Thumbnail 3260

As you can see, I selected the menu. Social media, content generation, target is US customers. And I select Instagram and run it. You see the dancing dots, right? In the AppSync version, streaming starts as soon as you send it. And Bedrock starts creating content and begins to generate. You will see the other screen catch up immediately. It creates a post and performs reasoning. And it continues. Because in the new version, we have actually incorporated a scoring engine into MCP, so it decided to score the content at the end. As you can see, the overall category score, brand alignment, and grammar are displayed. These are all different scoring mechanisms that can be set according to the type of content you are looking for.

Thumbnail 3290

In other words, it is completely customizable according to the content. For example, if you are writing technical content, you might want to do different scoring in terms of the complexity of technical terms. It is completely customizable. As I mentioned earlier, everything depends on the prompt and how you design them for a specific business unit. There are a few lessons learned as we move forward with this. Walter, I bring you many crazy ideas, but you always pull the team together and actually build the solution, don't you?

Looking back at the lessons learned, what would you say was the biggest challenge you had to deal with?

Well, I've listed a few bullet points here, but utilizing AppSync's keep-alive for server-side mutations was a huge challenge for us. When we first started using AppSync, it didn't give us the performance we expected, but later we realized that the problem was actually in our implementation method or how we used it. Establishing a connection and performing a handshake every time was something that required utilizing connection pools. If you don't do that and do all the work every time, it takes time.

As I mentioned before, it is important to always be open to new technologies. We started with a deployment that just did content creation within Sun Life Fast tools, and then built a solution to deploy in containers. We are now considering .NET Core, and I don't know what will be released next week. It seems like there are new releases from AWS almost every week, so building in a modular way so that you can move anywhere is key. I think this is one of the biggest lessons. Building something that is cohesive, robust, and deployable, right?

Thumbnail 3380

However, as you can see, this was a massive architectural diagram. Many people had to work on this. We pushed the boundaries in these various services and scenarios. As you can see, these are some of the key contributors to the design of the solution, each involved in every part of the box. In fact, when Walter showed that architectural diagram in a project meeting, I could associate names with each of these boxes. But when everything came together and we actually performed a streaming demo, it was truly wonderful. It's free.

So everyone, thank you. Thank you for staying until the last session. We are standing between you and the party, but we will be at the venue after this. I know there was a lot of content to cover. Whether it is MCP, AppSync, or content creation, I will answer any questions you have. I'm here. Please answer the survey in the mobile app. Don't leave stars. This is the last session. You can give it 5 stars, but please enjoy the party tonight. We hope you enjoyed it. Thank you.

Discussion