Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5uEyg58znuchZ8C8i
11 lines
716 B
Bash
Executable File
11 lines
716 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# NOT RUN against a real account. Names and ids are examples. EKS Pod Identity instead of IRSA: no OIDC provider,
|
|
# and the pod receives AWS_CONTAINER_CREDENTIALS_FULL_URI (see output/06-bedrock-pod-identity.txt for that path).
|
|
set -euo pipefail
|
|
aws iam create-role --role-name spring-ai-bedrock \
|
|
--assume-role-policy-document file://deploy/pod-identity-trust-policy.json
|
|
aws iam put-role-policy --role-name spring-ai-bedrock --policy-name invoke-one-model \
|
|
--policy-document file://deploy/bedrock-invoke-policy.json
|
|
aws eks create-pod-identity-association --cluster-name my-cluster --namespace ai \
|
|
--service-account spring-ai --role-arn arn:aws:iam::111122223333:role/spring-ai-bedrock
|