On a Thursday the Bedrock bill doubles and nobody can say which team called which model. The AWS logs show one shared role, not a person or an application. That scenario is the simplest test of secure Amazon Bedrock access: can you answer, after the fact, « who called what, under which identity, and at what cost »?
In November 2025 AWS and Dynatrace published a reference pattern for this: a gateway placed in front of Bedrock. Dynatrace’s post explains the idea; the technical detail lives in an AWS code sample under the MIT-0 licence. Dynatrace presents the pattern as coming from its own generative AI workloads (vendor post).
This article does not tour the product. It follows an operations decision: what should your team check before ten teams call Bedrock through the same door? It is separate from our piece on vulnerable AI services, which is about software components, not identity.
A note on honesty: span.observer has not deployed this pattern. The facts come from the Dynatrace post, the AWS architecture post (only partly readable) and the repository’s CloudFormation file, read as published. The identity model and the Dynatrace-side tracking remain for you to verify.
Why secure Amazon Bedrock access goes through a single door
Without an intermediary, each application signs its own requests with AWS credentials. Three problems follow, which the Dynatrace post sums up: models that anyone holding credentials can invoke, audit evidence that is hard to produce, and developers who handle request signing themselves.
The gateway moves the question. The client presents a token from your identity system; the gateway checks it, signs the request on its behalf, then forwards it to Bedrock. The client keeps the usual AWS SDK (Boto3 in the sample). According to the AWS sample, you disable client-side signing and add an aws-endpoint-prefix header, plus an optional bearer token.
The post also cites quotas and throttling, per-tenant usage tracking, and no extra code when Bedrock adds a feature. The repository does not describe how those are implemented: usage plans appear only as suggested enhancements. Treat them as goals, not shipped features.
The path of a call, from client to model
The path has four stages. Each is a decision point and a place to leave a trace.
- Amazon API Gateway receives the call. Authorisation, throttling and release management apply here.
- A Lambda authorizer decides whether the token is valid. Dynatrace validates JWTs there; you can swap in your own logic or an Amazon Cognito user pool.
- An integration Lambda copies the request, signs it with AWS Signature Version 4 and sends it to the right Bedrock endpoint.
- Amazon Bedrock runs the model.
An optional Route 53 piece gives the gateway its own domain name. The integration Lambda does not know Bedrock’s APIs one by one: it passes requests through. That avoids rewriting the gateway for every new feature, but it also leaves the gateway blind to content.
What the AWS template does not do for you yet
The bedrock-llm-gateway.yaml file is a starting point, not a finished solution. Three details found in the file (read on 11 November 2026) deserve a decision before production.
First, one parameter opens or closes the door.
The default is a PRIVATE endpoint (reachable from a VPC) with the authorizer on. A rule rejects a REGIONAL deployment without an authorizer. However, EnableAuthorizer: false remains possible on a private endpoint: the repository reserves it for testing, but nothing stops someone forgetting it.
Second, identity is not supplied. The shipped authorizer is a stub that denies everything.
Two lines matter for traceability. The authorizer result is cached for 300 seconds, so a revoked token can still pass for five minutes. And the stub hard-codes the principal as 'user': if you keep it and only replace the token test, all your callers will look like one. Return the real identity (team, application or user) in principalId.
Third, the integration Lambda’s permissions are broad.
The role gets the managed policy AmazonBedrockFullAccess. The repository itself recommends least privilege. Since every call goes through this role, Bedrock sees the role, not the caller: restrict the allowed models, and do not rely on Bedrock’s own logs alone to tell your teams apart.
One last point: the file we read configures neither access logs nor tracing on the API stage. Tracking is yours to build.
Connecting the gateway to observability
Dynatrace’s post says that observability of Bedrock workloads gives continuous insight into performance, reliability and cost, and helps confirm that controls stay effective. It does not say how to wire it, and we have not tested it. What follows is the author’s proposal, not from the post.
- Enable access logs on the
v1stage and record the authorizer principal, the request ID and the status code. - Route those logs to Dynatrace with the AWS integration of your choice (see CloudWatch metrics and logs in Dynatrace).
- Set an alert on two simple signals: the authorizer’s denial rate and the call volume per principal.
- Tie tokens to cost per application, as in the cost of an AI agent with OpenTelemetry; the role of a general-purpose LLM gateway is compared in our article on LiteLLM and Helicone.
From an SRE viewpoint, a gateway adds a link: give it its own availability and latency SLO, separate from Bedrock’s, otherwise an authorizer outage will look like a model outage. The 300-second timeout on the integration Lambda, read in the file, suggests long responses fit; the AWS post also mentions streaming, which we did not verify end to end.
Best practices
- Replace the authorizer before any other setting, and test an expired token and a token from another team.
- Keep
EndpointType: PRIVATEas long as no client outside the VPC needs access. - Replace
AmazonBedrockFullAccesswith a policy that lists the models and regions you need. - Never put a token or key in an access log; log an identifier, not the secret.
- Shorten the authorizer cache if fast revocation matters to you.
- For encryption with a key you manage, see BYOK encryption between AWS and Dynatrace.
Frequently asked questions
Do you need a gateway to use Bedrock in a company?
No, but it becomes useful when several teams share one account and you must tell callers apart, cap usage and prove who did what.
Is the AWS template ready for production?
Not as it stands. The repository says so itself: the authorizer denies everything by default and least privilege must be applied. It is a sample, with little activity on the repository when we read it.
Does this pattern apply to Dynatrace Managed or SaaS?
The gateway is an AWS component, independent of the Dynatrace edition. The post mentions Dynatrace observability without distinguishing Managed from SaaS; check your edition’s documentation for how to ingest AWS logs.
Conclusion
Secure Amazon Bedrock access is proven by its logs: first put a real identity in the authorizer, cut the role’s permissions, then log the stage. The sample-ai-gateway-for-amazon-bedrock repository gives you the skeleton; the rest is your operating decision.
span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC; Amazon Bedrock is an Amazon Web Services service. Details change: check the official documentation.
Originally published on span.observer. French version: https://span.observer/fr/acces-amazon-bedrock-securise/.



Top comments (0)