Andres Moreno Profile Picture

Andres Moreno

I'm Andres Moreno, Principal Software Architect at Caylent. I focus on serverless techonology in AWS

Skip the Middleman: Connecting Your UI Directly to an AI Agent via WebSocket

Learn how to connect your browser directly to an AI agent over WebSocket using Amazon Bedrock AgentCore, skipping the traditional Lambda proxy and enabling real-time token streaming.

9-Minute Read

Title image for Skip the Middleman: Connecting Your UI Directly to an AI Agent via WebSocket

I’ve been building AI agents for a while now, and streaming responses to a UI has always been the painful part. In previous projects I tried API Gateway streaming, Lambda response streaming, and even AppSync Events via an agent tool call to notify the UI. I also looked at adding my own WebSocket API through API Gateway, which requires managing $connect, $disconnect, and $default routes, storing connection IDs in DynamoDB, and posting messages back through @connections. All of these…

Step Functions without ASL? Welcome Lambda Durable Functions

I've regularly said that AWS Step Functions is my favorite service, this all might be changing with the introduction of Lambda Durable Functions. We'll be going on a deep dive into durable functions and how they work.

11-Minute Read

Distracted boyfriend meme. The boyfriend is looking at a Lambda durable function while the angry girlfriend has the Step Functions logo as the face.

During re:Invent, AWS announced a new feature within AWS Lambda called durable functions. These are the same Lambda functions we all love, but they let you run multi-step workflows by keeping checkpoints and state. What does this mean? You can run similar functionality to what we’ve typically used AWS Step Functions for. But instead of using Amazon State Language, you can use familiar code and dependencies.

Log buffering with Lambda Powertools

Let's understand what log buffering is, how it's configured in your Lambda Functions and see real results in CloudWatch by trying different configuration options.

7-Minute Read

Title image with Andres pointing to text that says Log Buffers with Powertools for AWS Lambda

The Lambda Powertools team released a new feature that allows your Lambda functions to buffer logs. That sounded cool, but I didn’t understand how it would work or how logs would show in CloudWatch. I decided to try it out and provide a visual example of how it looks with different configuration options.

Secure API Gateway with Amazon Cognito using SAM

Getting basic authentication for your API is not as hard as it sounds. In this post we'll be going through the steps to secure your APIs with Amazon Cognito

8-Minute Read

I create a lot of APIs, these are for blog posts, for playing around with new functionality or tools that I’ve created for myself. All of these have been created without authentication in place. Not securing APIs can create data exposures for you, but it can also pose a financial risk to your accounts if a malicious user gets your endpoints. This is why I want to secure any API I create but I want this to be with minimal setup so that it’s simple to replicate many times.

Using YAML anchors and aliases in a SAM template

Learn how you can setup your SAM template to reuse common pieces of config by using anchors and aliases without introducing any problems.

5-Minute Read

Image of me looking at a big text that says 'YAML Anchors in SAM

Last month I wrote a post about getting rid of Lambda Layers by using ESBuild. What I quickly learned is that the Metadata attribute has to be copied and pasted for EVERY Lambda function in your stack. I tried using the Global section in the SAM template and it turns out it’s not supported. I started thinking about how I could reuse the same configuration across my template and found that YAML already has a functionality that does this called YAML Anchors and Aliases. In this post I will…

Recent Posts