---
title: "Comment by OneLifeVibe on \"Build a Serverless AI API on AWS with Bedrock, Lambda and Terraform\" | Hashnode"
description: "The SCP lesson is the part I will remember: AdministratorAccess meaning nothing when an SCP caps the account is exactly the kind of thing that looks like an IAM"
url: "https://hashnode.com/posts/serverless-ai-api-aws-bedrock-lambda-terraform/6af1b72c8c484ce98b3767b9/comment/6af3130c89a0e7693f62c53b"
---

[Discussion](https://hashnode.com/posts/serverless-ai-api-aws-bedrock-lambda-terraform/6af1b72c8c484ce98b3767b9)

Comment [Build a Serverless AI API on AWS with Bedrock, Lambda and Terraform](https://hashnode.com/posts/serverless-ai-api-aws-bedrock-lambda-terraform/6af1b72c8c484ce98b3767b9)

[OneLifeVibe](https://hashnode.com/@onelifevibe)

[Nov 10](https://hashnode.com/posts/serverless-ai-api-aws-bedrock-lambda-terraform/6af1b72c8c484ce98b3767b9/comment/6af3130c89a0e7693f62c53b)

The SCP lesson is the part I will remember: AdministratorAccess meaning nothing when an SCP caps the account is exactly the kind of thing that looks like an IAM bug until you check organizations describe-organization. I also liked the IAM detail that the model ARN can use a wildcard Region because the bedrock:InferenceProfileArn condition does the real scoping, so the role can only reach the model through that one profile. One question on the cross-Region setup: when you split compute in eu-north-1 and Bedrock in eu-west-1, did you find the 29-second Lambda timeout ever collided with cross-Region inference latency on longer outputs, or was the max\_tokens cap enough to keep responses inside the API Gateway 30-second limit?

[Ige Olajide Gideon](https://hashnode.com/@marshalll)

[Nov 11](https://hashnode.com/posts/serverless-ai-api-aws-bedrock-lambda-terraform/6af1b72c8c484ce98b3767b9/comment/6af3130c89a0e7693f62c53b#reply-6af452a7808f797007002e31)

I appreciate. That SCP issue cost me days, so I’m glad it’s useful.

Honestly, I never got to test it. My Bedrock quota was zero, so every call failed with ThrottlingException before the model even started.

My guess is the Region hop isn’t the issue, since that’s only milliseconds. Long outputs are, which is why I capped max\_tokens at 512 and set Lambda to 29s, just under API Gateway’s 30s limit. For longer responses, I would switch to streaming or an async job instead.

I’ll share real numbers once my quota is fixed.
