class AgentRuntimeArtifact
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.AgentRuntimeArtifact |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#AgentRuntimeArtifact |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.AgentRuntimeArtifact |
Python | aws_cdk.aws_bedrock_agentcore_alpha.AgentRuntimeArtifact |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป AgentRuntimeArtifact |
Abstract base class for agent runtime artifacts.
Provides methods to reference container images from ECR repositories or local assets.
Example
const repository = new ecr.Repository(this, "TestRepository", {
repositoryName: "test-agent-runtime",
});
const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");
const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
runtimeName: "myAgent",
agentRuntimeArtifact: agentRuntimeArtifact,
authorizerConfiguration: agentcore.RuntimeAuthorizerConfiguration.usingOAuth(
"https://github.com/.well-known/openid-configuration",
"oauth_client_123",
),
});
Initializer
new AgentRuntimeArtifact()
Methods
| Name | Description |
|---|---|
| bind(scope, runtime) | Called when the image is used by a Runtime to handle side effects like permissions. |
| static from | Reference an agent runtime artifact that's constructed directly from sources on disk. |
| static from | Reference an image in an ECR repository. |
| static from | Reference an image using an ECR container URI. |
| static from | Reference an agent runtime artifact that's constructed directly from an S3 object. |
bind(scope, runtime)
public bind(scope: Construct, runtime: Runtime): void
Parameters
Called when the image is used by a Runtime to handle side effects like permissions.
static fromAsset(directory, options?)
public static fromAsset(directory: string, options?: DockerImageAssetOptions): AgentRuntimeArtifact
Parameters
- directory
stringโ The directory where the Dockerfile is stored. - options
Dockerโ The options to further configure the selected image.Image Asset Options
Returns
Reference an agent runtime artifact that's constructed directly from sources on disk.
static fromEcrRepository(repository, tag?)
public static fromEcrRepository(repository: IRepository, tag?: string): AgentRuntimeArtifact
Parameters
- repository
IRepository - tag
string
Returns
Reference an image in an ECR repository.
static fromImageUri(containerUri)
public static fromImageUri(containerUri: string): AgentRuntimeArtifact
Parameters
- containerUri
stringโ The ECR container image URI (format: {account}.dkr.ecr.{region}.amazonaws.com/{repository}:{tag}).
Returns
Reference an image using an ECR container URI.
Use this when referencing ECR images from CloudFormation parameters or cross-stack references.
Note: No IAM permissions are automatically granted. You must ensure the runtime has ECR pull permissions for the repository.
static fromS3(s3Location, runtime, entrypoint)
public static fromS3(s3Location: Location, runtime: AgentCoreRuntime, entrypoint: string[]): AgentRuntimeArtifact
Parameters
- s3Location
Locationโ The source code location and configuration details. - runtime
Agentโ The runtime environment for executing the code.Core Runtime - entrypoint
string[]โ The entry point for the code execution, specifying the function or method that should be invoked when the code runs.
Returns
Reference an agent runtime artifact that's constructed directly from an S3 object.

.NET
Go
Java
Python
TypeScript (