-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IT-3988: Add role to invoke model and move inline sso policy to managed policy #1277
Changes from 5 commits
44ecb01
92f7d2f
425e5f5
bde215d
186507c
ffdc3e1
e5631ba
8cab8d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the role used by the agent when it's running. It has the right to execute a model. |
||
Description: Enables executing a Bedrock model | ||
|
||
Resources: | ||
bedrockAgentRole: | ||
Type: AWS::IAM::Role | ||
Properties: | ||
AssumeRolePolicyDocument: | ||
Version: 2012-10-17 | ||
Statement: | ||
- Effect: Allow | ||
Principal: | ||
Service: bedrock.amazonaws.com | ||
Action: sts:AssumeRole | ||
Condition: | ||
StringEquals: | ||
aws:SourceAccount: !Ref AWS::AccountId | ||
ArnLike: | ||
aws:SourceArn: !Sub "arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:agent/*" | ||
Policies: | ||
- PolicyName: bedrockAgentPolicy | ||
PolicyDocument: | ||
Version: "2012-10-17" | ||
Statement: | ||
- Effect: Allow | ||
Action: "bedrock:InvokeModel" | ||
Resource: | ||
- !Sub "arn:aws:bedrock:${AWS::Region}::foundation-model/*" | ||
|
||
Outputs: | ||
BedrockAgentRoleArn: | ||
Description: The ARN of the Bedrock Agent Role | ||
Value: !GetAtt bedrockAgentRole.Arn | ||
Export: | ||
Name: BedrockAgentRoleArn |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -641,18 +641,6 @@ SsoLlmDeveloper: | |
managedPolicies: | ||
- 'arn:aws:iam::aws:policy/AmazonBedrockFullAccess' | ||
- 'arn:aws:iam::aws:policy/AWSCloudFormationFullAccess' | ||
# https://stackoverflow.com/questions/58125181/cloud-formation-cant-upload-template-file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving to a managed policy with the hope we can tweak it manually until we get what we need. Inline, we get an error because it's under AWS control. |
||
inlinePolicy: >- | ||
xschildw marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": "s3:*", | ||
"Resource": "arn:aws:s3:::cf-template*" | ||
} | ||
] | ||
} | ||
sessionDuration: 'PT12H' | ||
|
||
# Role for a user that can only access AWS Athena in the Synapse Dev account | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this role necessary when the goal is to only fix the developer role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the policy for the user (sso-llmdeveloper) to be able to work in the console/cloudformation to create an agent.