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.

Using Amazon Cognito with the user-password flow

In May I released a post on how to secure APIs using machine-to-machine authentication. Exactly one day after that AWS Cognito changed their pricing model and now my proposed solution would generate cost for me. In this post I will go through a different setup using the user-password auth flow. This will still allow us to authenticate from automations and from Postman while keeping us in the free tier.

9-Minute Read

On my post called Secure API Gateway with Amazon Cognito using SAM I talked about different Auth terms and walked through a setup to use the Client Credentials Flow, but Cognito recently introduced pricing changes for machine-to-machine authentication that will make this cost us and my main goal is to do this while staying in the free tier for personal projects that will not be generating any income. That is why in this post I am going to setup Amazon Cognito using a different flow called user…

Creating users in Amazon Cognito programmatically

Short post to walk through the steps to create users in Amazon Cognito for automation

4-Minute Read

Title of the blog post and user icons with two of them with a picture of Andres

When you have CI/CD pipelines that run automated tests against your APIs you might need to dynamically create users in Amazon Cognito to run them. If that is the case you are in the right place. In this post we’ll be going over what you need to do to create a valid user in Cognito to be used by your automation.

Recent Posts