A ride-sharing startup wants riders to chat with a Bedrock-backed assistant from its iOS and Android apps, with as little custom infrastructure as possible while staying secure. Which approach is most straightforward?
Show answer and explanation
Answer: D
Amplify authentication backed by Cognito gives each signed-in user short-lived AWS credentials scoped by policy, so the device never holds a permanent secret. Sending model calls through API Gateway to a Lambda function keeps Bedrock permissions, logging, and Guardrails on the server side. Embedded keys, public unauthenticated calls, and long-lived secrets in configuration all expose credentials or let anyone run up model costs.
Why the other options are wrong
- A. Keys compiled into an app can be extracted from the binary, and an IAM user's long-lived credentials would then grant anyone the same Bedrock access.
- B. An unauthenticated public endpoint lets anyone who finds it run up model charges, and it offers no per-user identity for limits or auditing.
- C. A remote configuration file is downloaded by every client, so a secret placed there is effectively public and cannot be protected.