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 |
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Abstract base class for agent runtime artifacts.
Provides methods to reference container images from ECR repositories or local assets.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_ecr_assets as ecr_assets } from 'aws-cdk-lib';
declare const networkMode: ecr_assets.NetworkMode;
declare const platform: ecr_assets.Platform;
const agentRuntimeArtifact = bedrock_agentcore_alpha.AgentRuntimeArtifact.fromAsset('directory', /* all optional props */ {
assetName: 'assetName',
buildArgs: {
buildArgsKey: 'buildArgs',
},
buildContexts: {
buildContextsKey: 'buildContexts',
},
buildSecrets: {
buildSecretsKey: 'buildSecrets',
},
buildSsh: 'buildSsh',
cacheDisabled: false,
cacheFrom: [{
type: 'type',
// the properties below are optional
params: {
paramsKey: 'params',
},
}],
cacheTo: {
type: 'type',
// the properties below are optional
params: {
paramsKey: 'params',
},
},
displayName: 'displayName',
exclude: ['exclude'],
extraHash: 'extraHash',
file: 'file',
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
invalidation: {
buildArgs: false,
buildContexts: false,
buildSecrets: false,
buildSsh: false,
extraHash: false,
file: false,
networkMode: false,
outputs: false,
platform: false,
repositoryName: false,
target: false,
},
networkMode: networkMode,
outputs: ['outputs'],
platform: platform,
target: 'target',
});
Initializer
new AgentRuntimeArtifact()
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
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 agent runtime artifact that's constructed from local code assets uploaded to a CDK-managed S3 bucket. |
| 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
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
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
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
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 fromCodeAsset(options)
public static fromCodeAsset(options: CodeAssetOptions): AgentRuntimeArtifact
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- options
Code— The options for configuring the code asset.Asset Options
Returns
Reference an agent runtime artifact that's constructed from local code assets uploaded to a CDK-managed S3 bucket.
static fromEcrRepository(repository, tag?)
public static fromEcrRepository(repository: IRepository, tag?: string): AgentRuntimeArtifact
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
Parameters
- repository
IRepository - tag
string
Returns
Reference an image in an ECR repository.
static fromImageUri(containerUri)
public static fromImageUri(containerUri: string): AgentRuntimeArtifact
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
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
⚠️ Deprecated: Use the equivalent construct from aws-cdk-lib/aws-bedrockagentcore instead.
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 (