-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(agentcore): add agentcore runtime L2 construct #35623
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
base: main
Are you sure you want to change the base?
Conversation
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 review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
packages/@aws-cdk/aws-bedrock-agentcore-alpha/agentcore/runtime/perms.ts
Outdated
Show resolved
Hide resolved
/** | ||
* Agent runtime artifact configuration for Bedrock Agent Core Runtime | ||
*/ | ||
export interface AgentRuntimeArtifactConfig { |
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.
Are we expecting this configuration to have more elements in the future? Do you know if there are plans for that? Seems like having this interface at the moment is not adding too much value, you could potentially return the URI directly in the bind method rather than this object (in CDK, we tend to favor flat composition over nested composition if we can)
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 mirrors the cloudformation structure of agentruntimeartifact . IMHO, we should keep it as cloud formation structure because if the underlying service add any new field in this object then the flat structure of containeruri
may cause breaking changes for the L2 construct.
packages/@aws-cdk/aws-bedrock-agentcore-alpha/agentcore/runtime/runtime.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-bedrock-agentcore-alpha/agentcore/runtime/runtime.ts
Show resolved
Hide resolved
packages/@aws-cdk/aws-bedrock-agentcore-alpha/agentcore/runtime/types.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-bedrock-agentcore-alpha/agentcore/runtime/runtime.ts
Outdated
Show resolved
Hide resolved
* @param clientId Cognito App Client ID | ||
* @param region Optional AWS region (defaults to stack region) | ||
*/ | ||
public configureCognitoAuth( |
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 and the other methods below are exactly what I was expecting to see instead of https://github.com/aws/aws-cdk/pull/35623/files#r2398909386.
Simple and specific for each type of auth configuration. I would prefer to keep only this idea and drop the possibility for the user to set up manually the auth config with all the possible wrong combinations they could make if we let it fully configurable.
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.
Ack.
packages/@aws-cdk/aws-bedrock-agentcore-alpha/agentcore/runtime/runtime-endpoint-base.ts
Outdated
Show resolved
Hide resolved
public readonly endpointName: string; | ||
public readonly agentRuntimeArn: string; | ||
public readonly status?: string; | ||
public readonly targetVersion?: string; |
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.
What is the difference between this and the agentRuntimeVersion
?
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.
We actually have two of those liveVersion and targetVersion. I have added liveVersion with this new commit.
this.liveVersion = this.endpointResource.attrLiveVersion;
this.targetVersion = this.endpointResource.attrTargetVersion;
https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agent-runtime-versioning.html
As per my understanding
Initial Creation :
- You set
agentRuntimeVersion: "1"
- Both
liveVersion
andtargetVersion
will be "1" - Status: READY
During Update :
- Update runtime version to "2"
liveVersion
remains "1"targetVersion
becomes "2" (transitioning to this)- Status: UPDATING
After Update Completes :
- Both
liveVersion
andtargetVersion
become "2" - Status: READY
Issue # (if applicable)
Closes #<785>.
Reason for this change
Adding bedrock agent core runtime and runtime endpoint
Description of changes
Describe any new or updated permissions being added
The runtime creates a role with permission to ecr repo, cloudwatch , xray .
Description of how you validated changes
Unit tests, integration tests, manual tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license