AWS Greenlight: First Impressions from the Preview
By Fabio Douek
Level 100 · How it works
Human-led, AI-assisted. Research and implementation done with AI tools, led, tested and edited by me. How posts are labeled
EventAWS re:Invent 2026: times, streams and recordings →Nov 30 to Dec 4, 2026
Jump to section
Explain (TLDR) like I am...
Imagine a robot that helps at a toy shop and can give money back. You write two rules on a card: check the toy first, and never give back more than five big coins. A grown-up guard at the door reads the card and stops the robot whenever it breaks a rule.
The clever part is a puzzle checker that tries every sneaky way the robot could break the rules before the guard starts work. It found one sneaky way I had missed, and we fixed the card before the shop opened.
AWS Greenlight is a preview service that turns stated business rules into machine-checked policies for an AI agent's tool calls, enforced by the gateway in front of the tools, not by the agent's own judgement. Approved versions are numbered and can be rolled back.
The diligence points are data flow and scope. The agent's recorded calls go to the Greenlight service and to your coding agent's model provider, and the policies only see one conversation at a time. A cap per refund is not a cap per order, unless you write that rule too.
Greenlight treats a specific condition: agents acting on tools with no reliable limits beyond the prompt. The intervention is a set of written rules, checked by automated reasoning before they go live, and applied at the gateway on every call.
In my trial the checks caught one gap in my first draft and confirmed the fix. Side effects to watch: rules are bounded by what the tools show, a gateway looks back only 24 hours, and the policies limit what you wrote down, nothing more.
Notice how much worry sits on a single line in a system prompt that says "never refund more than 500 dollars". Greenlight moves that worry out of the agent and into a rule a separate system checks, which is a calmer place for it to live.
The new conversation is about what the team actually means. Writing the rules down exposes the gaps, such as whether one refund or one order is capped, and someone has to own those answers.
Think of Greenlight as the chart the band agrees on before the gig. The agent can still improvise, but the gateway is the sound engineer who mutes any note outside the key you wrote down.
The rehearsal is the good part: Greenlight plays every possible phrase against the chart and points out the bar where a wrong note still gets through. You fix the chart, play it in log only, then go live.
The story is "rules the model cannot talk its way around". Greenlight turns a business rule into a checked policy and shows you, before go-live, what it would have blocked in the agent's real traffic.
The positioning is safety for teams that want agents to act without a human approving each step. Time to first policy is short once the prerequisites are in place; the setup itself is the slow part in preview.
Overview
AWS Greenlight entered preview on 1 December 2026, described in the announcement as “a new automated reasoning service that keeps your agent within bounds and on task”. The user guide calls it AWS Greenlight for Agents. It takes the rules an agent should follow, from your own words, documents or the agent’s recorded tool calls, writes them as policies, checks those policies with automated reasoning, and puts them on the gateway in front of the agent’s tools. The gateway then decides every tool call before it runs, whatever the model says.
It is not a console service. Greenlight ships as a plugin for Claude Code and Codex and as a power for Kiro. You type govern my agent and the coding agent walks through the stages, calling the Greenlight service for the checks. Policies go to an Amazon Bedrock AgentCore Gateway or a Strands Box, or nowhere at all (“No Target” mode exports them as files). It is available in seven Regions: US East (N. Virginia and Ohio), US West (Oregon), Europe (Frankfurt, Ireland and Stockholm) and Asia Pacific (Sydney).
This is a Level 100 post: how Greenlight works, shown with one real run of AWS’s own refund sample agent rather than a test suite. I deployed the sample in my account, let Greenlight build policies for its two refund rules, ran them in log only, then enforced them.
Architecture
Three pieces do the work:
- The coding agent is the language model in the loop. The plugin’s skill tells it, step by step, how to read your sources, write each rule as a Dogwood statement and record it. Dogwood extends Cedar with time: a policy can look back at earlier calls in the same conversation (
formerly,since,count,sum). - The Greenlight service checks what the model wrote. It has three actions behind IAM:
AnalyzePolicies(duplicates and conflicts),SimulatePolicies(replays recorded calls) andCheckAction(“can the agent ever do this?”). - The gateway enforces the approved version. Every tool call is decided before the tool runs, on its arguments and the earlier calls in the same policy session. Greenlight is not in that path, so the agent keeps working if the service is down. If the service is down, the checks fail closed and nothing new can be approved.
How It Works
The sample is fixed: refundbox, a Strands agent in a Strands Box on AgentCore Runtime, whose tools go through a gateway, refundgw, with two Lambda tools, lookup_order and refund_order. Its policy engine starts in log only. The sample comes with two requirements:
A refund requires an earlier lookup of the same order in the conversation.
Deny any individual refund whose amount is greater than $500.
Getting there took longer than the governance itself. Besides the plugin (install.sh, toolkit 0.2.1, with uv and the AWS CLI), I had to build the dogwood CLI 1.1.0 with Rust 1.97.1, upgrade to the AgentCore CLI 1.5.0 and install Strands Box 0.3.3, the combination the sample is validated with. Two of my own account’s quirks also cost time, and are not Greenlight’s: an old CloudFormation hook in us-east-1 blocked the CDK bootstrap, so I moved to us-west-2, and the sample agent’s default model, Claude Sonnet 5.5 on Bedrock, needed a model agreement my account didn’t have. The sample’s five scenarios call the tools in a fixed script without the model, so they still tested the gateway end to end. The sample’s CloudFormation deploys took about 8 minutes for the stack, 5 to route the agent to the gateway, 6 to add the policies and under 2 to switch to enforce.
I ran the plugin from Claude Code, unattended, stepping through its own scripts in the order its skill gives. In an interactive session the same stages ask you questions; here the sample’s fixed answers filled them. The scenarios, observe and check: runs below come from small scripts that call the plugin’s actions and only format their output; they are in the companion code, with the requirements, properties and the four approved policies in governance/.
1. From requirements to Dogwood
Greenlight first read the gateway: two tools, no policies, and an engine that allows nothing yet. It turned each requirement into a “property”, an outcome that must always hold, and then the model wrote the policies. The refund amount arrives in cents (amount_cents, an integer), so the cap became a plain comparison, and the lookup rule became a time-based permit:
permit refunds___refund_order
when: a refunds___lookup_order response with this request's order_id
and output found = true occurred within the last 24 hours
forbid refunds___refund_order
when: the request's amount_cents > 50000
That is dogwood explain, which reads the policies back in plain words. Before a time-based policy is recorded, Greenlight makes the model write two test sessions for it, one that must be blocked and one that must be allowed, and runs them on the service. A flipped negation that validates cleanly but inverts the rule fails here. Both of mine passed.
2. The checks: one counterexample
Then the checks ran: Analyze (no duplicates or conflicts), no Simulate (there were no recorded calls yet), and Verify, which asks the service whether any sequence of calls the policies allow breaks a property. The $500 cap came back verified. The lookup rule did not:
| # | Call | When | Result |
|---|---|---|---|
| 1 | lookup_order, request | 24 hours before the refund | allowed |
| 1 | lookup_order, response | just before the refund, inside the window | allowed |
| 2 | refund_order | now | allowed, breaks it |
My check said “the lookup was requested within the last 24 hours”. The policy only looked for the lookup’s response, so a lookup whose request fell just outside the window still counted. It is an edge case, but the checker found it by searching every history rather than the ones I thought of. Greenlight’s procedure for a violated property is to add a policy that stops that call, so a fourth policy now requires the lookup’s request inside the window too. On the second run all three property checks were verified, and I approved the set as version 1: four policies, one allowing lookups, one conditional permit for refunds and two forbids.
3. Log only first
The approved policies went onto the gateway in log only. I ran the sample’s five scenarios through the real agent runtime and gateway. Every call went through, and Greenlight’s observe step read the gateway’s logs and said what the policies would have done:
| Scenario | Tool calls | Log only |
|---|---|---|
| same-order-under-limit | lookup ORD-1001, refund ORD-1001 $20.00 | allowed |
| without-lookup | refund ORD-1001 $20.00 | allowed |
| different-order | lookup ORD-1001, refund ORD-2001 $20.00 | allowed |
| at-limit | lookup ORD-2001, refund ORD-2001 $500.00 | allowed |
| over-limit | lookup ORD-2001, refund ORD-2001 $500.01 | allowed |
For each run of these five, observe listed three refunds the policies would have denied: the two without a lookup of the same order under “Refund only an order looked up within the last 24 hours”, and the $500.01 one under “Refund at most $500 in one refund”. It closes with “Log only doesn’t change what your agent does. These calls went through”. This is the step to run on real traffic for a while: it shows what enforcing would break before it breaks it.
4. Enforce
Switching the engine to enforce is one more stack update. The same five scenarios then gave:
| Scenario | Expected | Gateway answer |
|---|---|---|
| same-order-under-limit | allowed | allowed |
| without-lookup | denied | denied by pb_h88fno_refund_needs_lookup_request |
| different-order | denied | denied by pb_h88fno_refund_needs_lookup_request |
| at-limit | allowed | allowed |
| over-limit | denied | denied by pb_h88fno_refund_max_500 |
The tool never ran for the denied calls. The agent got back “Tool Execution Denied: Tool call not allowed due to policy enforcement”, with the policy’s name in it. The two refunds without a matching lookup were stopped by the fourth policy, the one Verify’s counterexample added; nothing else permits them either, but the forbid is what the gateway names. Observe now marks each call the gateway actually denied as “already denied”, apart from the earlier ones that were only logged.
5. Asking it questions
After approval you can ask the policies questions in plain English (check: …), and Greenlight answers by searching every history, not by running one example:
| Question | Answer |
|---|---|
| Can it ever refund an order it never looked up in this conversation? | ✓ Verified |
| Can it ever refund more than $500 in one call? | ✓ Verified |
| Can it ever refund the same order twice in one conversation? | ✗ Not verified: lookup, refund, refund is allowed |
The third answer is the useful one. The sample’s rules cap each refund, not each order: two $500 refunds of one order after one lookup are allowed. Greenlight only enforces what you write down, and the checks are how you find out what you didn’t.
What it can’t do (yet)
- Only what the tools show. A policy sees this call’s inputs and the earlier calls in the same policy session. A rule about earlier conversations, or a fact no tool returns, is reported as a gap with a suggested tool change, not enforced.
- 24 hours of history on a gateway, and only calls that carry the policy session header. Once a time-based policy is on an enforcing gateway, calls without that header are rejected.
- Limits of the checks: Simulate takes at most 40 policies at once, Analyze and Verify up to 200, each policy at most 10,000 characters, and some checks come back Inconclusive under a time limit (limitations).
- Data flow. The recorded calls go to the Greenlight service, and everything the scripts print, account IDs and ARNs included, goes to your coding agent’s model provider. Free text such as a refund reason is masked; identifier-shaped values are not.
- Mac or Linux only, and the sample cannot change its policies after version 1: to try other rules you govern your own agent.
How it compares
| AWS Greenlight | AgentCore Policy alone | Strands Box alone | |
|---|---|---|---|
| Where rules run | Gateway or box, outside the agent | Gateway | Box (OS sandbox) |
| Who writes the rules | Coding agent drafts, you approve | You (Cedar or natural language) | You (Dogwood file) |
| Learns from recorded calls | Yes | Not described | Not described |
| Checks every possible sequence | Yes (Verify) | Flags over-permissive, over-restrictive or unsatisfiable rules | Not described |
| Rules over earlier calls | Yes (Dogwood) | Cedar, per call | Yes (Dogwood) |
AgentCore Policy already enforces Cedar rules at the gateway and flags rules that are too permissive, too restrictive or can never be satisfied. Greenlight adds the drafting, the learning from traffic, the time-based rules and the “can this ever happen?” proofs on top, and uses the same gateway to enforce them.
Cleanup
The sample is one CloudFormation stack, AgentCore-refundbox-default. Greenlight itself deletes nothing. Deleting the stack removes the gateways, the policy engine, the runtime, the memory, the Lambda tools, the results bucket and the gateways’ log groups. It took me about six minutes. Two log groups outlive it, the runtime’s and the auto-delete Lambda’s, so I deleted every log group with refundbox in its name afterwards:
aws cloudformation delete-stack --stack-name AgentCore-refundbox-default --region us-west-2
aws cloudformation wait stack-delete-complete --stack-name AgentCore-refundbox-default --region us-west-2
for g in $(aws logs describe-log-groups --region us-west-2 \
--query "logGroups[?contains(logGroupName,'refundbox')].logGroupName" --output text); do
aws logs delete-log-group --region us-west-2 --log-group-name "$g"
done
The first deploy also bootstrapped CDK in the Region (CDKToolkit, with a KMS key, an S3 bucket and an ECR repository). That stack is shared by every CDK app in the account and Region, so keep it if you already had one. Mine was new, so I deleted it too, after emptying its bucket and repository.
Verdict
Greenlight moves an agent’s rules out of the prompt and into a gateway that decides every tool call, and the check step is what makes that worth doing. In one short run it found a gap in my first draft, confirmed the fix, and told me plainly that “never more than $500” did not mean “never refund an order twice”.
What works:
- The checks. Verify searches every sequence of calls, and a counterexample is concrete: the calls, in order, that break the rule.
- Log only, then enforce. Observe reads the gateway’s real logs and names the policy that would have denied each call before anything is blocked.
- Plain-English questions about the approved set, answered with a proof or a counterexample.
What needs care in preview:
- The setup: a Rust toolchain for the dogwood CLI, matching AgentCore CLI and Strands Box versions for the sample, and most of my time went into that setup, not into Greenlight.
- The policies are only as complete as the rules you state. Use the
check:questions to find what you didn’t say. - The model writes the Dogwood. Greenlight checks it, but you still read the report before you approve.
If you run agents behind an AgentCore Gateway and already worry about the one line in the system prompt that says “never”, Greenlight is worth an afternoon. Start in No Target mode or with the sample, and keep the gateway in log only until observe shows nothing you didn’t expect.
The my2cents.ai email
AI and cloud tools, tested for real. In your inbox once a week.
The week's hands-on tests and the launches that matter, in one email.