Category: Blogs
Govern and Discover AI Agents and Tools with Amazon Bedrock AgentCore Registry
Have you noticed it yet? Your organization is building AI agents across multiple teams. One team creates a customer support agent, another builds an internal knowledge assistant, and a third develops a set of MCP tools for code review. But none of these teams know what the others have built. Agents and tools are scattered across repositories, accounts, and business units with no central place to discover, govern, or manage them.
Why Cedar Policies Matter for Your Amazon Bedrock AgentCore Gateway
You are building an agentic solution. Your agent has access to MCP tools, and those tools perform real actions: approving expenses, issuing refunds, updating records. You write careful prompt instructions so the large language model picks the right tool for the right situation. Everything works on the happy path. But what happens when it doesn’t?
Why Prompt Management Matters for Agentic Applications
Have you experienced it already? You are working on an agentic solution and writing prompts for large language models. Where do you put your prompts? Do you write your prompt in your Python file itself? Or are you creating a separate file containing the prompt, then loading it into a variable to pass it to the model when invoking it?
Organizing Git Access per Customer with 1Password SSH Agent
As consultants, we must juggle multiple credentials, including those from Xebia. But we are also onboarded at the customers where we are hired for our assignments. I already blogged on how I separate my browser sessions for different clients. This gives me the ability to have relevant bookmarks for my assignment. This blog will continue to explain how I organize my git access and separate them per customer.
Fixing oversized artifacts AWS CDK Pipelines
I built a workload using AWS Cloud Development Kit (AWS CDK), and the AWS CodePipeline stopped working at the worst moment. It was right at the end of the sprint; we had done multiple deployments before. But at this moment, the moment you might recognize. When this last PR is released, we will have met our deadline! Kaboom, the pipeline stops working, and the reason for the failure is not related to the changes you made.
AWS CDK and the Hidden Risks to Least Privilege
Have we given up on the least privileged principle? Personally, I am a big fan of it. But let’s be honest, it can also be tough to follow the principle strictly. With the rise of AWS Cloud Development Kit (AWS CDK), it became even harder.
Optimizing OpenSearch Ingestion: Ensuring Reliability, Efficiency, and Cost Savings
Ingesting data into an OpenSearch cluster looks easy if you read the documentation. The truth is it is easy, but it all depends on how much you care about the data you are ingesting. Let me go one step back. Why do we even use OpenSearch? With the rise of AI, you also need a knowledge base. These knowledge bases can be hosted in OpenSearch. However, to use the OpenSearch database, you must also fill it out with data.
RDS User Provisioning and Schema Migrations with AWS Lambda
Have you ever been in a situation where you want to provision or configure things cross-stack? Splitting these into logical stacks is always good when dealing with more complex environments. I already shared this in one of my previous blogs. But this also introduces a different problem!
Securing Amazon S3 Downloads with ALB and Cognito Authentication
Securing an endpoint used to be hard. Nowadays, with the cloud, it’s quite easy. You only need to know how! Assume you have files on Amazon S3 that you like to share. You could make the object publicly available. This would allow your users to download the file using their browsers simply. If you need to scale it, you can add Amazon CloudFront. This would cache the content closer to your users, making sure that your users have the best performance. But what if you want to control who can download the file? For this, you will need authentication and authorization.
Become a documentation ninja
Writing documentation sucks! But there are ways to make it easier and maybe even fun! In one of my previous blogs, I explained how you can embed your documentation in your pull requests and why you should consider doing it, too. In this blog, I want to go a bit deeper into the syntax you can use to improve your documentation pages on Confluence.
ECS Fargate Persistent Storage: EFS Access Points vs. Lambda Workarounds
When running a Docker container on Amazon Elastic Container Service and AWS Fargate, persistent storage is often a necessity. I initially attempted to solve this by manually creating the required directory on Amazon Elastic File System using a AWS Lambda backed custom resource. While this worked, it introduced unnecessary complexity. Through experimentation, I discovered a more elegant solution—using EFS access points. In this post, I’ll walk through my journey, the challenges I faced, and how I ultimately simplified the setup with fewer resources and less maintenance.
Streamlining Workflows with Feature Branches and Logical Stacks
Efficient collaboration and streamlined deployment processes are essential in modern development workflows, especially for teams working on complex projects. Feature branches and stack-based development approaches offer powerful ways to isolate changes, test effectively, and ensure seamless integration. However, proper strategies can make managing resources, dependencies, and environments challenging. This blog explores how to optimize feature branch workflows, maintain encapsulated logical stacks, and apply best practices like resource naming to improve clarity, scalability, and cost-effectiveness.
Stop organizing scavenger hunts in your cloud infrastructure
A CloudWatch alarm is triggered. Now what? I am not the first person to tell you that observability is essential to your cloud infrastructure. You are not done when you have set up CloudWatch alarms!
Boost Your Productivity with awscurl: Simplifying IAM-Secured API Testing in AWS
With modern clouds, you can build awesome things. You can bring your ideas to life within the hour, enabling experimentation and driving innovation. One of the significant advantages of the cloud is that you get a lot of security controls out of the box. But these security controls can also block you from being productive!
Relative Python imports in a Dockerized lambda function
Relative Python imports can be tricky for lambda functions. I wrote a blog on this 3 years ago. But recently, I ran into the same issue with Dockerized lambda functions. So, I figured it was time for a new blog!
Serverless, it can help you brew beer
I like to combine technology with something more practical. This helps me understand the technology much better. Plus, when you have a practical example, it’s also easier to explain to my wife and friends. During the coronavirus pandemic, I started brewing beer. Brewing beer involves a lot of steps, and the brewer needs to take many steps. But some steps can be automated!
Avoid Costly Loops in AWS Step Functions
We all played around with AWS StepFunctions in our careers. It is a fantastic orchestration tool! But there are some scenarios where your cloud bill can explode in your face! In this blog, I will walk you through how you can end up in this situation and, maybe more importantly, how to avoid it!
Make writing documentation part of your pull request
We are all guilty of this one! We changed something, and we forgot to update the documentation. Even if you have the best intentions to do your best, it’s way too easy not to do it.
Abuse CDK functionality in CloudFormation
Each “Infrastructure as Code” framework has pros and cons. My go-to framework is CloudFormation, but I like CDK’s tree view, so I started thinking about borrowing this.
Share your configuration across AWS accounts
It’s a best practice to split your environments into separate AWS accounts. It does not cost you anything extra and you can guarantee that your development environment is completely isolated from the higher environments. With this setup, it’s also common to have a build or tooling account to be responsible for the deployment of your application.
How to Speedup Your CDK Test Feedback
When you deploy lambda functions using CDK and a test-driven approach, you might have noticed that the test feedback takes longer each time you add a new function. That’s because each function will be bundled with its own set of dependencies. These dependencies need to be downloaded before CDK can bundle them into a single package.
Use CloudWatch LogGroups for EC2 logging
You can protect yourself from losing logs on Amazon EC2 by using CloudWatch Logs. Configure the CloudWatch Agent to stream your logs to a LogGroup. This protects you from losing logs. For example, when the instance is replaced by autoscaling. You are also protected against tampering of the logs. An attacker who has gained access to your system can remove the logs. But the logs in the LogGroup will contain the original log lines.
Compliant infrastructure using infrastructure as code
When you are using compute you have a lot of options. One of these options is Amazon EC2. In a world where more and more workloads become serverless. You might still have this use-case that is better off on EC2. But, how do you combine EC2 with compliance and security? In this blog post we will explore how we can build a compliant and secure EC2 stack.
Tracking your security posture in AWS
How do you track your security posture in AWS? You have services like Security Hub, but it will only show you the scores of a limited set of standards. This blog post will continue on the previous 2 blog post that I wrote:
Deploy AWS Config rules across your organization
In my previous blog I showed you how you can write your own config rules. But it will only bring you value if you deploy the rule in your AWS Accounts. In this blog we will dive into the distribution of these config rules.
Use custom rules to validate your compliance
AWS has a lot of controls built in, but what if you need more? AWS Config allows you to create your own rules. These rules can then inspect your resources and determine if they are compliant. This is useful when you want to enforce certain configuration settings. Giving you an overview of how compliant your workloads are.
Using design patterns in AWS Lambda
When you speak with software developers, they will probably tell you that they use design patterns. But when the world first shifted to the internet the general feeling was that these design patterns would not work for the web. This is not true, and today you see these patterns being used more and more.
Setting up my own landing zone on AWS
As a consultant I am used to a certain level of quality that I need to deliver to our customers. For this reason I have built a landing zone for my own website, initiatives and experiments. By using the same structure that our customers have, I can test and build my ideas and apply them in customer environments if they are successful.
Using Golang for your Serverless projects
In one of my previous blogs I wrote why I switched to compiled languages for my lambda functions. But using Golang for your lambda functions does add some challenges. In this blog I would like to share the challenges that I have seen and how to mitigate them.
Avoid using the default profile
When you start working with AWS one of the easiest ways to interact with the APIs is through the IAM User. Although it’s not the advised way it’s the easiest way hence the most used one and the most abused one. In this blog I will dive a little deeper into this topic.
Stubbing AWS Service calls in Golang
I recently switched to Golang for my language of choice. (In my previous blog you can read why.) But I am also a big fan of test driven development. With Python you have a stubber that helps you mock the AWS API. So how do you do this in Golang? I found 2 ways to do this. One via dependency injection and one via a stubber. In this blog I will share my experience so far.
Using Golang for your AWS Lambda Functions
I was sparked on a XKE to do a short experiment with using Golang for my AWS Lambda Functions. The trigger for this was something my colleague Mark van Holsteijn said. We where talking about sustainability. During this talk Mark made the comment that we should drop Python for our functions then. (He also recently wrote a blog on Golang using Golang for custom providers.)
Invalidate CloudFront cache for Hugo websites
Hugo is a great tool that let you build website fast and easy. It will render a complete static HTML version of your website. This makes it an ideal candidate to host it on a S3 Bucket. You can then use CloudFront to serve the content across the globe.
Automate your workload insights
Managing more than one AWS accounts can become challenging. AWS Organizations provides a way to manage many accounts. You can automate account creation and management. If you use a naming schema you can leverage landingzone-organization!
Use StepFunctions to simplify your serverless applications
Use StepFunctions to simplify your serverless applications
AWS StepFunctions is a great orchestrating tool for your serverless applications. When you write lambda functions that only contain logic to perform a single task they are easier to test. Especially when there is no orchestration logic within your function.
Why should I set a canonical URL?
If you like blogging like me, you probably post your content on multiple places. For example, I post my content on xebia.com, conijn.io and dev.to. When you do not provide a canonical url search engines like Google are less likely to show your blog.
How to update your repository from a gitlab pipeline
Did you ever ran into the scenario where you wanted to update files in a repository from your pipeline? I did, a couple of times actually!
Cross account DNS management on AWS
I recently created a few blog post on how you can build, deploy and host an application on AWS. This blog post is all about handling DNS records in a cross account setup. You might think AWS got you covered, but the sad reality is that they don’t. (when dealing with cross account use cases.)
Deploy S3 hosted application using CodePipeline
A while ago I wrote how you can host your own single page application on S3. But how will you get your application on the S3 bucket? There are a couple of options here, you could upload it by hand? But we both know that is not the real solution here. No we want to automate this process! In this blog post I will show you how you can automate this using AWS CodePipeline.
Cross account deployments using a Customer Managed KMS key
In my previous blog I wrote about application pipelines. These CodePipeline use a S3 bucket. What if you have a need for a customer managed key instead of the Amazon managed key? And you want to deploy the CloudFormation templates cross account? In this blog I will explain how you can achieve this.
Building applications with pipelines
In larger organizations a lot of things are in place. Think of things like deployment pipelines for your applications. But how do you set those up using the services AWS provides? In this blog post I will guide you to how I do it for my pet projects.
Use EventBridge to handle API requests
At AWS re:Invent I attended SVS312 Building Serverlesspresso. This talk was about how you can create event-driven architectures. I am a fan of event-driven architectures. So I wanted to highlight a interesting technique using EventBridge shown in this talk.
Don't let security slow you down
In my previous blog I wrote on how AWS embeds security in their teams. Jorge Liauw Calo challenged me to tell me a bit more on my security vision. So why not do another blog post ;-).
Embed security in your teams
During AWS re:Invent I attended the SEC322: Transform builder velocity with security chalk talk. I would have pointed you to the recording on YouTube. But unfortunately, chalk talks are not recorded! So instead you have to do it with my interpretation of the session.
Write AWS Config rules
AWS Config rules allow you to determine if a resource is compliant or not. Previously when you wanted to do custom checks you needed to write AWS Lambda functions to validate the configuration of a resource. Since Aug 2, 2022 you have the ability to use cfn-guard rules to achieve the same.
Speedup python cli projects
Use our python-cli-tool cookiecutter project. Get an python cli project up and running in a few steps. In my previous speedup-event-driven-projects blog. I wrote how you could use cookiecutter to spin up an event driven project for AWS. In this blog post I will show you how you could do this for python cli projects.
Speedup event driven projects
Use our sam-eventbridge-project cookiecutter project. Get an event driven project up and running in a few steps. On the 3rd of October the AWS Community Day NL was held in Amersfoort. I gave a talk about CodeCommit and how you could use events to make your life easier.
How to work with different browser profiles
Finicky will help you when you use different browsers, and/or different profiles. As a consultant I often use browser profiles to split my clients. I have a “Binx.io” profile for all Binx related work. For each client I have corresponding profiles. Let’s call them “Client A” and “Client B”.
Use a help target in your Makefile
In one of my previous blog. I wrote how you could make your life easier when you start using Makefile. But when you start using Makefile in many projects. The targets that you use may vary from project to project.
Learning HashiCorp Terraform on AWS
I have been working as a consultant for over a year now. And I noticed that a lot of our clients are asking for experience on HashiCorp Terraform and AWS. So I figured it might be time to learn something new!
IAM User credentials with MFA
When you use IAM user for programmatic access. You have an ACCESS_KEY and a SECRET_ACCESS_KEY. With these credentials you are able to interact with AWS. A common pattern is that you will use the IAM User to assume roles in the same or even in different AWS accounts.
The CLI configuration would look something like this:
Working with AWS Permission Policies
Policies and Permission Controls
Access management is a crucial part of managing your workloads. It is also one of the primary areas where debugging can be problematic. In AWS, there are multiple ways to control access to the platform at various levels. These permission policies make it possible to optimize control of applications, programs, and resources, so day-to-day operations run as smoothly as possible. AWS has many options to create secure policies on its platform. Deciding which policies and permission controls to use for different organizations can seem daunting. Organizations rely on AWS Identity and Access Management (IAM) for access management. But there are more options, particularly for larger, more complex organizations with many accounts. Here, we tackle the best use case scenarios for AWS access management according to the needs of different users and organizations, small and large. We also address new developments and guidance in debugging permission errors.
Migrate resources across CDK stacks
When you start building infrastructure as code. You will run into the situation that, you want to split a stack into separate ones. Or, you deployed a resource in the wrong stack. This is all part of the development lifecycle. You try things, some succeed, some will fail. But deployed production resources are hard to rebuild. They either have a complex data migration path or you can’t afford the downtime.
Diagrams as code
Most of you have heard of “infrastructure as code” by now. But building cloud infrastructures is more than coding infrastructure. In this blog I will show you how I make my own live easier by generating infrastructure diagrams from code.
When you have read my previous blogs about Commit messages done the right way. You are not surprised that I like to make things easy for the reader. When you are new to a team, or you are not familiar with a specific repository that your team maintains. It helps when the README.md of the repository helps you understand what the repository does.
Sync AWS CodeCommit repositories
In some scenarios you might have the need to replicate an AWS CodeCommit repository. When I was setting up a test organization using AWS Deployment Framework (ADF) I ran into this myself. Because I want to test the deployment of my landing zone I needed to have a close replica. This includes the CodeCommit setup.
But at the same time I did not want to change the development workflow. The workflow is pretty straight forward. You create a feature branch to work in. When you are ready you merge it to a development branch. When it needs to go to production you merge it into the main branch.
So we will use the development branch to deploy to the test organization. But, because the test organization is a replica of production. Merging to the development branch would not have effect on the test organization. For this we need to synchronize the development branch to the test organization.
Running a git binary in AWS Lambda
Running a git binary in AWS Lambda
In some scenarios it can be easier to use a binary in a lambda function. In this blog post I will walk you through how you can run a git binary in an AWS Lambda.
Hosting a single page application or website on S3
In this blog post I will walk you through how to configure a single page application or website. In a previous blog Best practices for S3 web hosting and explaining why. Tibor Hercz explained the best practices for hosting a static website on S3.
As Tibor explained, there are some downsides on using a Origin Access Identity (OAI). But in some Single Page Applications (SPA) you will not experience this downside.
Improve your pull request workflow using pull-request-codecommit
In my previous blog post, I wrote why it is important to write good commit messages. In this post I will highlight an example how this works in your advantage. Using an AWS CodeCommit repository.
Commit messages done the right way
We have all seen it. You see something in your source code. You do not know why it was added. And you look at the commit history. And then you see: “fix bug” or “add feature name”. How helpful is that message? In this blog post I will address how you can write commit messages that are helpful. And optimized for the reader.
How to set up AWS Session Manager logging cross account
Setting up and managing access to your EC2 instances can be challenging. There are a lot of things you need to consider. How do you rotate your keys? Who logged in using that key? How do you limit the risk of thread actors? And what did they do? What if you could log the complete session in a different AWS Account? And encrypt it using a customer managed KMS key? That would give you complete visibility and auditability on your shell sessions. In this blog post I will address those questions using AWS Session Manager.
Testing your Landing Zone when using AWS Deployment Framework
If you are thinking of setting up a landing zone using ADF in AWS you will need to read this. And why? Because I will tell you why you need to set up two landing zones. And how you can use them to test your landing zones.
This is how you can test your cfn-guard rules
In my previous blog, How do you prove that your infrastructure is compliant. I explained how you can prove your infrastructure is compliant using CloudFormation Guard. But, how do you write those rules? And even more important, how do you test your rules? If you look at the repository CloudFormation Guard. You will notice that the project itself offers a testing framework. Alright! Let’s build a ruleset and write some tests for it!
How do you prove that your infrastructure is compliant
When you are building your cloud infrastructure. And you have to meet certain compliance standards. You can achieve this with preventive and detective controls. In this blog post I want to focus on the preventive control. How you can stop the deployment pipeline when the infrastructure is non-compliant. And how you can visualize this using CloudWatch Reports. Let’s say that our company has the following rule:
Python and relative imports in AWS Lambda Functions
When writing an AWS Lambda function, it’s quite possible that you get to the point where the file becomes too big. So, what do you do? You create a second file and refactor your code to do a relative import. Then, the only step left is to deploy your code and run it. And then it fails… Have you been here before? Then I might have some sound advice for you.
If you look at the PEP 8 — Style Guide for Python Code.
You will read that absolute imports are recommended. But, explicit relative imports are an acceptable alternative to absolute imports.
This means that you should favor absolute imports. And only use relative imports within a package.
Make your life easier using Makefiles
In this blog post I will show how you can use a Makefile to make your life easier.
In this blog I will use CDK with python. But the principle of the Makefile will work on almost any project.
When you start a new PoC you do not have a full CI/CD environment in place yet.
So how can you deploy your CDK application? And make it easy to add the CI/CD pipeline at a later point?
Increasing your development speed with AWS Lambda Powertools
It is not possible to remember all methods and properties from all classes that you write and use. That is the reason why I like to have type hinting in my IDE. In fact I will spend time to make sure it works. I even wrote a blog post about how to set it up when I started experimenting with a new language. In this post I will provide you with a couple of tips that help you develop faster. By leveraging type hinting using the AWS Lambda Powertools
How to use AWS SAM with Go in Visual Studio Code
Setup Visual Studio Code as your IDE to build and deploy an AWS SAM stack using Go. I recently started to experiment with Go and the best way to learn is to play with it and build something. So I decided to build a simple application. During this process I ran into the problem that my IDE did not like having many go modules within one project.
How to search and find related logs in AWS Log Groups
You can search across log groups by setting up a correlation id on your log lines. You can then use CloudWatch Logs Insights to query all related log messages.
If you are dealing with different lambda functions in a project, you might not have a logging system yet. Finding and troubleshooting using Cloudwatch Logs could become cumbersome. Especially if you try to track a flow through the different log groups.
In CloudWatch Logs Insights you can execute queries across log groups. In our case we want to collect related log lines across log groups. To achieve this we need to annotate the log lines with a correlation_id that ties them together.