Class AgentRuntimeArtifact

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrockagentcore.AgentRuntimeArtifact
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.129.0 (build eaca441)", date="2026-05-19T08:18:44.212Z") @Stability(Stable) public abstract class AgentRuntimeArtifact extends software.amazon.jsii.JsiiObject
Abstract base class for agent runtime artifacts.

Provides methods to reference container images from ECR repositories or local assets.

Example:

 // S3 bucket containing the agent core
 Bucket codeBucket = Bucket.Builder.create(this, "AgentCode")
         .bucketName("my-code-bucket")
         .removalPolicy(RemovalPolicy.DESTROY)
         .build();
 // the bucket above needs to contain the agent code
 AgentRuntimeArtifact agentRuntimeArtifact = AgentRuntimeArtifact.fromS3(Location.builder()
         .bucketName(codeBucket.getBucketName())
         .objectKey("deployment_package.zip")
         .build(), AgentCoreRuntime.PYTHON_3_12, List.of("opentelemetry-instrument", "main.py"));
 Runtime runtimeInstance = Runtime.Builder.create(this, "MyAgentRuntime")
         .runtimeName("myAgent")
         .agentRuntimeArtifact(agentRuntimeArtifact)
         .build();
 
  • Constructor Details

    • AgentRuntimeArtifact

      protected AgentRuntimeArtifact(software.amazon.jsii.JsiiObjectRef objRef)
    • AgentRuntimeArtifact

      protected AgentRuntimeArtifact(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • AgentRuntimeArtifact

      @Stability(Stable) protected AgentRuntimeArtifact()
  • Method Details

    • fromAsset

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromAsset(@NotNull String directory, @Nullable DockerImageAssetOptions options)
      Reference an agent runtime artifact that's constructed directly from sources on disk.

      Parameters:
      directory - The directory where the Dockerfile is stored. This parameter is required.
      options - The options to further configure the selected image.
    • fromAsset

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromAsset(@NotNull String directory)
      Reference an agent runtime artifact that's constructed directly from sources on disk.

      Parameters:
      directory - The directory where the Dockerfile is stored. This parameter is required.
    • fromCodeAsset

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromCodeAsset(@NotNull CodeAssetOptions options)
      Reference an agent runtime artifact that's constructed from local code assets uploaded to a CDK-managed S3 bucket.

      Parameters:
      options - The options for configuring the code asset. This parameter is required.
    • fromEcrRepository

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromEcrRepository(@NotNull IRepository repository, @Nullable String tag)
      Reference an image in an ECR repository.

      Parameters:
      repository - This parameter is required.
      tag -
    • fromEcrRepository

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromEcrRepository(@NotNull IRepository repository)
      Reference an image in an ECR repository.

      Parameters:
      repository - This parameter is required.
    • fromImageUri

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromImageUri(@NotNull String containerUri)
      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.

      Parameters:
      containerUri - The ECR container image URI (format: {account}.dkr.ecr.{region}.amazonaws.com/{repository}:{tag}). This parameter is required.
    • fromS3

      @Stability(Stable) @NotNull public static AgentRuntimeArtifact fromS3(@NotNull Location s3Location, @NotNull AgentCoreRuntime runtime, @NotNull List<String> entrypoint)
      Reference an agent runtime artifact that's constructed directly from an S3 object.

      Parameters:
      s3Location - The source code location and configuration details. This parameter is required.
      runtime - The runtime environment for executing the code. This parameter is required.
      entrypoint - The entry point for the code execution, specifying the function or method that should be invoked when the code runs. This parameter is required.
    • bind

      @Stability(Stable) public abstract void bind(@NotNull software.constructs.Construct scope, @NotNull Runtime runtime)
      Called when the image is used by a Runtime to handle side effects like permissions.

      Parameters:
      scope - This parameter is required.
      runtime - This parameter is required.