Tobias Schmidt
banner
tpschmidt.com
Tobias Schmidt
@tpschmidt.com
680 followers 64 following 1.1K posts
Helping aspiring engineers master the cloud 👨‍💻 Freelance Software Engineer ✍️ Book #1: http://awsfundamentals.com 📕 Book #2: http://cloudwatchbook.com Learn AWS for Free: https://awsfundamentals.com/newsletter
Posts Media Videos Starter Packs
Example: execute generated code inside Lambda, locking it down in a VPC with no public internet. If you need S3 access, it can happen through a VPC endpoint. Lambda’s hard timeouts keep "rogue" code from doing bad things. Dependencies still need to be pinned, sure.
Lambda has tons of use cases, but one I've missed: using it as some kind of sandbox for running AI-generated code.
Lambda's isolation and scaling are a solid fit for this problem.
Btw I'm Tobi, a full-stack engineer who's broken (and fixed) plenty of AWS stacks in production. If you want a clearer picture of how AWS services fit together, I put together some free animations that break it all down.
awsfundamentals.com/animations
Animations | AWS Fundamentals
Learn visually with our animated guides to AWS services.
awsfundamentals.com
Still has some quirks and found a few things that are not quite right in the documentation and/or are not easy to configure, but I like where AWS is heading with CloudWatch! 💛
• Custom business logic spans for detailed application code visibility 🛠️
• Real-time service maps in CloudWatch Application Signals 🗺️
• Transaction Search to follow individual requests across your stack 🔎
• Automatic service discovery that maps your application topology in real-time 📡
• Request tracing through ECS containers to Lambda functions 🕵️
Then you can auto-instrument your app with one line of code and everything is ready to use.

What you'll get, mostly out of the box:
For Fargate, you basically just need to run the CloudWatch agent as a sidecar. The image is built by AWS and comes ready to use. Just need to inject a few environment variables and you're ready to go.

For Lambda, you can use a Lambda layer that is also developed by AWS.
Setting up an OpenTelemetry & CloudWatch-based observability solution with Fargate and Lambda is quite simple.
It also automatically integrates with Application Signals!

Played around with it a lot in the past few days and I like it.
🎁 Bonus: The service configuration can also take care of setting up auto-scaling or using the Spot capacity provider.

Bootstrapping Fargate tasks was never that simple nor cheap! 🤩
This means you'll just point to your repository's Docker file(s) and SST will build & upload images on demand.

No need for custom scripts.
• a VPC with private & public subnets
• an ECS service, with a corresponding cluster & a task definition
• the task & task execution roles for ECS
• an API GW that routes requests through CloudMap & a VPC integration

SST will also handle the Docker magic.
Setting up an exposed Fargate task with ECS is still not a simple task. With sst.dev, this is enough to bootstrap and wire everything 🪄

What's behind these few lines?
Afterward, you can try out Teleport for free for 14 days to get your own perspective and experience on their service:
fandf.co/4nJSbwR
If you're just starting out or if you want to take your agent setup to a professional level in your company, have a read of Teleport's in-depth guide on MCP security. You'll definitely learn a lot:
fandf.co/3IFbAQF
In a nutshell 🥜
Each LLM or service gets just the access it needs, only when it needs it. Fresh, short-lived credentials. All actions logged.
Good news: you don't need to build this yourself.
Teleport.sh solves all of this for you!

Big thanks to them for partnering on this post and introducing me their platform! 🤝
So what do we need to make this better?

1. Dedicated identities for the LLMs/MCP servers 👥
2. Tailored permissions, only for actions that are necessary 📝
3. Short-lived credentials 🔑
4. Auditing of actions taken ✏️
When taking it further, thinking about multi-agent scenarios where agents are fanning out calls to other agents, this traceability issue becomes even worse.
The problem: if you run them locally via your own assumed role, or even remotely in some instance or Lambda function, you always have the issue of sticky long-term credentials.

What's even worse is that there's zero traceability out of the box.
Most people I know worry about their AWS accounts' security.
With no spending cap, this is a valid concern.
Today, with LLMs & MCP servers, security becomes even harder.

I love using MCP servers for AWS tasks, especially with the large set of official ones provided by AWS.
Worth to check out the docs from time to time as they are crystal clear.
docs.aws.amazon.com/AmazonCloud...
• ⚡️ 𝗟𝗮𝗺𝗯𝗱𝗮: just pull in the ADOT layer, set a few environment variables and you're good to go.
• 🤖 𝗘𝗖𝗦: either bundle the auto-instrumentation dependency into your app or use the pre-built docker layer as an init sidecar.

Yes, it's that simple.