Skip to content
v2.278.0

Amazon Bedrock AgentCore Construct Library ​

Version 2.278.0-alpha.0

Separate package

@aws-cdk/aws-bedrock-agentcore-alpha is not part of aws-cdk-lib — install it separately:

sh
npm install @aws-cdk/aws-bedrock-agentcore-alpha
pip install aws-cdk.aws-bedrock-agentcore-alpha

Deprecated

This API may emit warnings. Backward compatibility is not guaranteed.


All constructs moved to aws-cdk-lib/aws-bedrockagentcore.

LanguagePackage
Typescript Logo TypeScript@aws-cdk/aws-bedrock-agentcore-alpha

Migration to Stable ​

All constructs in this module, including the Policy submodule, have moved to aws-cdk-lib/aws-bedrockagentcore:

ts
// Before
import * as agentcore from '@aws-cdk/aws-bedrock-agentcore-alpha';
python
# Before
import aws_cdk.aws_bedrock_agentcore_alpha as agentcore
java
// Before
import software.amazon.awscdk.services.bedrock.agentcore.alpha.*;
csharp
// Before
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
go
// Before
import agentcore "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
ts
// After
import * as agentcore from 'aws-cdk-lib/aws-bedrockagentcore';
python
# After
import aws_cdk.aws_bedrockagentcore as agentcore
java
// After
import software.amazon.awscdk.services.bedrockagentcore.*;
csharp
// After
using Amazon.CDK.AWS.BedrockAgentCore;
go
// After
import agentcore "github.com/aws/aws-cdk-go/awscdk"

The following constructs are now in stable:

The stable Policy submodule has API changes from this module:

  • PolicyStatement is a props object instead of a fluent builder. Conditions are passed as the when array.
  • A stable Gateway associates a policy engine through the policyEngineConfiguration prop, and grants the gateway role evaluate permissions automatically.
  • The default gateway enforcement mode is PolicyEngineMode.ENFORCE instead of LOG_ONLY.

See the aws-cdk-lib/aws-bedrockagentcore README for the stable Policy documentation.

Policy Engine ​

A policy engine is a collection of policies that evaluates and authorizes agent tool calls. When associated with a gateway, the policy engine intercepts all agent requests and determines whether to allow or deny each action based on the defined policies.

For more information, see the Policy in Amazon Bedrock AgentCore documentation.

PolicyEngine Properties ​

NameTypeRequiredDescription
policyEngineNamestringNoThe name of the policy engine. Valid characters: a-z, A-Z, 0-9, _ (underscore). Must start with a letter, 1-48 characters. If not provided, a unique name will be auto-generated
descriptionstringNoOptional description for the policy engine (max 4,096 characters). Default: no description
kmsKeyIKeyNoCustom KMS key for encryption. IMPORTANT: Once set, cannot be changed (requires replacement). Must be symmetric ENCRYPT_DECRYPT key. If key becomes inaccessible, all authorization decisions will be DENIED. Default: AWS owned key
tags{ [key: string]: string }NoTags for the policy engine (max 50 tags). Default: no tags

Understanding Cedar Policies in AgentCore ​

Policies are constructed using Cedar language, an open source language for writing and enforcing authorization policies. Cedar policies in AgentCore follow a specific structure with three main components: Principal, Action, and Resource. Understanding how these components work together is critical for writing effective policies.

Policy Structure ​

Every Cedar policy has this basic structure:

cedar
permit(              // or forbid
  principal,         // Who is making the request
  action,            // What operation they want to perform
  resource           // What Gateway/tool they want to access
)
when {               // Optional conditions
  // Additional constraints
};

Example Policy

cedar
permit(
  principal,
  action == AgentCore::Action::"ApplicationToolTarget___create_application",
  resource == AgentCore::Gateway::"<gateway-arn>"
) when {
  context.input.coverage_amount <= 1000000
};

Basic PolicyEngine and Policy Creation ​

Create a policy engine and add policies to it.

Policy Engine Mode ​

When associating a policy engine with a gateway, you can control the enforcement behavior using PolicyEngineMode:

  • PolicyEngineMode.LOG_ONLY (default) — evaluates actions and adds traces but does not enforce decisions. Use this mode for testing and validation before enabling enforcement.
  • PolicyEngineMode.ENFORCE — actively allows or denies agent operations based on Cedar policy evaluation.
ts

// Create a Policy engine
const policyEngine = new agentcore.PolicyEngine(this, "MyPolicyEngine", {
  policyEngineName: "my_policy_engine",
  description: "Policy engine for access control",
});

const gateway = new agentcore.Gateway(this, "MyGateway", {
  gatewayName: "my-gateway",
  policyEngineConfiguration: {
    policyEngine: policyEngine,
    mode: agentcore.PolicyEngineMode.ENFORCE, // Default is LOG_ONLY
  },
});

// Add policy to policy engine
policyEngine.addPolicy("AllowAllActions", {
  definition: `
    permit(
      principal,
      action,
      resource == AgentCore::Gateway::"${gateway.gatewayArn}"
    );
  `,
  description: "Allow all actions on specific gateway (development)",
  validationMode: agentcore.PolicyValidationMode.IGNORE_ALL_FINDINGS, // This will ignore all cedar warnings
});

// you can add multiple policies to the policy engine
policyEngine.addPolicy("SpecificToolPolicy", {
  definition: `
    permit(
      principal is AgentCore::OAuthUser,
      action == AgentCore::Action::"WeatherTool__get_forecast",
      resource == AgentCore::Gateway::"${gateway.gatewayArn}"
    );
  `,
  description: "Allow specific weather tool access",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS, // This will fail policy creation for any cedar warning
});
python
# Create a Policy engine
policy_engine = agentcore.PolicyEngine(self, "MyPolicyEngine",
    policy_engine_name="my_policy_engine",
    description="Policy engine for access control"
)

gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway",
    policy_engine_configuration=agentcore.GatewayPolicyEngineConfig(
        policy_engine=policy_engine,
        mode=agentcore.PolicyEngineMode.ENFORCE
    )
)

# Add policy to policy engine
policy_engine.add_policy("AllowAllActions",
    definition=f"""
        permit(
          principal,
          action,
          resource == AgentCore::Gateway::\"{gateway.gatewayArn}\"
        );
      """,
    description="Allow all actions on specific gateway (development)",
    validation_mode=agentcore.PolicyValidationMode.IGNORE_ALL_FINDINGS
)

# you can add multiple policies to the policy engine
policy_engine.add_policy("SpecificToolPolicy",
    definition=f"""
        permit(
          principal is AgentCore::OAuthUser,
          action == AgentCore::Action::\"WeatherTool__get_forecast\",
          resource == AgentCore::Gateway::\"{gateway.gatewayArn}\"
        );
      """,
    description="Allow specific weather tool access",
    validation_mode=agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS
)
java
// Create a Policy engine
PolicyEngine policyEngine = PolicyEngine.Builder.create(this, "MyPolicyEngine")
        .policyEngineName("my_policy_engine")
        .description("Policy engine for access control")
        .build();

Gateway gateway = Gateway.Builder.create(this, "MyGateway")
        .gatewayName("my-gateway")
        .policyEngineConfiguration(GatewayPolicyEngineConfig.builder()
                .policyEngine(policyEngine)
                .mode(PolicyEngineMode.ENFORCE)
                .build())
        .build();

// Add policy to policy engine
policyEngine.addPolicy("AllowAllActions", AddPolicyOptions.builder()
        .definition(String.format("%n    permit(%n      principal,%n      action,%n      resource == AgentCore::Gateway::\"%s\"%n    );%n  ", gateway.getGatewayArn()))
        .description("Allow all actions on specific gateway (development)")
        .validationMode(PolicyValidationMode.IGNORE_ALL_FINDINGS)
        .build());

// you can add multiple policies to the policy engine
policyEngine.addPolicy("SpecificToolPolicy", AddPolicyOptions.builder()
        .definition(String.format("%n    permit(%n      principal is AgentCore::OAuthUser,%n      action == AgentCore::Action::\"WeatherTool__get_forecast\",%n      resource == AgentCore::Gateway::\"%s\"%n    );%n  ", gateway.getGatewayArn()))
        .description("Allow specific weather tool access")
        .validationMode(PolicyValidationMode.FAIL_ON_ANY_FINDINGS)
        .build());
csharp
// Create a Policy engine
var policyEngine = new PolicyEngine(this, "MyPolicyEngine", new PolicyEngineProps {
    PolicyEngineName = "my_policy_engine",
    Description = "Policy engine for access control"
});

var gateway = new Gateway(this, "MyGateway", new GatewayProps {
    GatewayName = "my-gateway",
    PolicyEngineConfiguration = new GatewayPolicyEngineConfig {
        PolicyEngine = policyEngine,
        Mode = PolicyEngineMode.ENFORCE
    }
});

// Add policy to policy engine
policyEngine.AddPolicy("AllowAllActions", new AddPolicyOptions {
    Definition = $@"
        permit(
          principal,
          action,
          resource == AgentCore::Gateway::""{gateway.gatewayArn}""
        );
      ",
    Description = "Allow all actions on specific gateway (development)",
    ValidationMode = PolicyValidationMode.IGNORE_ALL_FINDINGS
});

// you can add multiple policies to the policy engine
policyEngine.AddPolicy("SpecificToolPolicy", new AddPolicyOptions {
    Definition = $@"
        permit(
          principal is AgentCore::OAuthUser,
          action == AgentCore::Action::""WeatherTool__get_forecast"",
          resource == AgentCore::Gateway::""{gateway.gatewayArn}""
        );
      ",
    Description = "Allow specific weather tool access",
    ValidationMode = PolicyValidationMode.FAIL_ON_ANY_FINDINGS
});
go
// Create a Policy engine
policyEngine := agentcore.NewPolicyEngine(this, jsii.String("MyPolicyEngine"), &PolicyEngineProps{
	PolicyEngineName: jsii.String("my_policy_engine"),
	Description: jsii.String("Policy engine for access control"),
})

gateway := agentcore.NewGateway(this, jsii.String("MyGateway"), &GatewayProps{
	GatewayName: jsii.String("my-gateway"),
	PolicyEngineConfiguration: &GatewayPolicyEngineConfig{
		PolicyEngine: policyEngine,
		Mode: agentcore.PolicyEngineMode_ENFORCE(),
	},
})

// Add policy to policy engine
policyEngine.AddPolicy(jsii.String("AllowAllActions"), &AddPolicyOptions{
	Definition: fmt.Sprintf("\n    permit(\n      principal,\n      action,\n      resource == AgentCore::Gateway::\"%v\"\n    );\n  ", gateway.GatewayArn),
	Description: jsii.String("Allow all actions on specific gateway (development)"),
	ValidationMode: agentcore.PolicyValidationMode_IGNORE_ALL_FINDINGS(),
})

// you can add multiple policies to the policy engine
policyEngine.AddPolicy(jsii.String("SpecificToolPolicy"), &AddPolicyOptions{
	Definition: fmt.Sprintf("\n    permit(\n      principal is AgentCore::OAuthUser,\n      action == AgentCore::Action::\"WeatherTool__get_forecast\",\n      resource == AgentCore::Gateway::\"%v\"\n    );\n  ", gateway.*GatewayArn),
	Description: jsii.String("Allow specific weather tool access"),
	ValidationMode: agentcore.PolicyValidationMode_FAIL_ON_ANY_FINDINGS(),
})

Type-Safe Policy Builder ​

For a more type-safe approach, use the PolicyStatement builder instead of writing raw Cedar syntax.

ts
const gateway = new agentcore.Gateway(this, "MyGateway", {
  gatewayName: "my-gateway",
});

const policyEngine = new agentcore.PolicyEngine(this, "MyPolicyEngine", {
  policyEngineName: "my_policy_engine",
});

const allowAllPolicy = new agentcore.Policy(this, "AllowAllPolicy", {
  policyEngine: policyEngine,
  policyName: "allow_all",
  statement: agentcore.PolicyStatement.permit()
    .forAllPrincipals() // ** This will give overly permission to all principals
    .onAllActions()
    .onResource('AgentCore::Gateway', gateway.gatewayArn),
  description: "Allow all actions on specific gateway (development only)",
  validationMode: agentcore.PolicyValidationMode.IGNORE_ALL_FINDINGS,
});

// Generated Cedar:
// permit(
//   principal,
//   action,
//   resource == AgentCore::Gateway::"arn:aws:bedrock-agentcore:region:account:gateway/gateway-id"
// );
python
gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway"
)

policy_engine = agentcore.PolicyEngine(self, "MyPolicyEngine",
    policy_engine_name="my_policy_engine"
)

allow_all_policy = agentcore.Policy(self, "AllowAllPolicy",
    policy_engine=policy_engine,
    policy_name="allow_all",
    statement=agentcore.PolicyStatement.permit().for_all_principals().on_all_actions().on_resource("AgentCore::Gateway", gateway.gateway_arn),
    description="Allow all actions on specific gateway (development only)",
    validation_mode=agentcore.PolicyValidationMode.IGNORE_ALL_FINDINGS
)
java
Gateway gateway = Gateway.Builder.create(this, "MyGateway")
        .gatewayName("my-gateway")
        .build();

PolicyEngine policyEngine = PolicyEngine.Builder.create(this, "MyPolicyEngine")
        .policyEngineName("my_policy_engine")
        .build();

Policy allowAllPolicy = Policy.Builder.create(this, "AllowAllPolicy")
        .policyEngine(policyEngine)
        .policyName("allow_all")
        .statement(PolicyStatement.permit().forAllPrincipals().onAllActions().onResource("AgentCore::Gateway", gateway.getGatewayArn()))
        .description("Allow all actions on specific gateway (development only)")
        .validationMode(PolicyValidationMode.IGNORE_ALL_FINDINGS)
        .build();
csharp
var gateway = new Gateway(this, "MyGateway", new GatewayProps {
    GatewayName = "my-gateway"
});

var policyEngine = new PolicyEngine(this, "MyPolicyEngine", new PolicyEngineProps {
    PolicyEngineName = "my_policy_engine"
});

var allowAllPolicy = new Policy(this, "AllowAllPolicy", new PolicyProps {
    PolicyEngine = policyEngine,
    PolicyName = "allow_all",
    Statement = PolicyStatement.Permit().ForAllPrincipals().OnAllActions().OnResource("AgentCore::Gateway", gateway.GatewayArn),
    Description = "Allow all actions on specific gateway (development only)",
    ValidationMode = PolicyValidationMode.IGNORE_ALL_FINDINGS
});
go
gateway := agentcore.NewGateway(this, jsii.String("MyGateway"), &GatewayProps{
	GatewayName: jsii.String("my-gateway"),
})

policyEngine := agentcore.NewPolicyEngine(this, jsii.String("MyPolicyEngine"), &PolicyEngineProps{
	PolicyEngineName: jsii.String("my_policy_engine"),
})

allowAllPolicy := agentcore.NewPolicy(this, jsii.String("AllowAllPolicy"), &PolicyProps{
	PolicyEngine: policyEngine,
	PolicyName: jsii.String("allow_all"),
	Statement: agentcore.PolicyStatement_Permit().ForAllPrincipals().OnAllActions().OnResource(jsii.String("AgentCore::Gateway"), gateway.GatewayArn),
	Description: jsii.String("Allow all actions on specific gateway (development only)"),
	ValidationMode: agentcore.PolicyValidationMode_IGNORE_ALL_FINDINGS(),
})

Policy with Specific Actions ​

ts
declare const policyEngine: agentcore.PolicyEngine;
declare const gateway: agentcore.Gateway;

// Allow specific tool actions on specific gateway
// Action names follow pattern: "ToolName__operation"
policyEngine.addPolicy("SpecificToolPolicy", {
  statement: agentcore.PolicyStatement.permit()
    .forPrincipal('AgentCore::OAuthUser::your-client-id')
    .onActions([
      'AgentCore::Action::WeatherTool__get_forecast',
      'AgentCore::Action::WeatherTool__get_current',
    ])
    .onResource('AgentCore::Gateway', gateway.gatewayArn),
  description: "Allow specific weather tool operations",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS,
});

// Generated Cedar:
// permit(
//   principal is AgentCore::OAuthUser,
//   action in [
//     AgentCore::Action::"WeatherTool__get_forecast",
//     AgentCore::Action::"WeatherTool__get_current"
//   ],
//   resource == AgentCore::Gateway::"arn:aws:bedrock-agentcore:us-east-1:123:gateway/gw-123"
// );
python
# policy_engine: agentcore.PolicyEngine
# gateway: agentcore.Gateway


# Allow specific tool actions on specific gateway
# Action names follow pattern: "ToolName__operation"
policy_engine.add_policy("SpecificToolPolicy",
    statement=agentcore.PolicyStatement.permit().for_principal("AgentCore::OAuthUser::your-client-id").on_actions(["AgentCore::Action::WeatherTool__get_forecast", "AgentCore::Action::WeatherTool__get_current"
    ]).on_resource("AgentCore::Gateway", gateway.gateway_arn),
    description="Allow specific weather tool operations",
    validation_mode=agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS
)
java
PolicyEngine policyEngine;
Gateway gateway;


// Allow specific tool actions on specific gateway
// Action names follow pattern: "ToolName__operation"
policyEngine.addPolicy("SpecificToolPolicy", AddPolicyOptions.builder()
        .statement(PolicyStatement.permit().forPrincipal("AgentCore::OAuthUser::your-client-id").onActions(List.of("AgentCore::Action::WeatherTool__get_forecast", "AgentCore::Action::WeatherTool__get_current")).onResource("AgentCore::Gateway", gateway.getGatewayArn()))
        .description("Allow specific weather tool operations")
        .validationMode(PolicyValidationMode.FAIL_ON_ANY_FINDINGS)
        .build());
csharp
PolicyEngine policyEngine;
Gateway gateway;


// Allow specific tool actions on specific gateway
// Action names follow pattern: "ToolName__operation"
policyEngine.AddPolicy("SpecificToolPolicy", new AddPolicyOptions {
    Statement = PolicyStatement.Permit().ForPrincipal("AgentCore::OAuthUser::your-client-id").OnActions(new [] { "AgentCore::Action::WeatherTool__get_forecast", "AgentCore::Action::WeatherTool__get_current" }).OnResource("AgentCore::Gateway", gateway.GatewayArn),
    Description = "Allow specific weather tool operations",
    ValidationMode = PolicyValidationMode.FAIL_ON_ANY_FINDINGS
});
go
var policyEngine PolicyEngine
var gateway Gateway


// Allow specific tool actions on specific gateway
// Action names follow pattern: "ToolName__operation"
policyEngine.AddPolicy(jsii.String("SpecificToolPolicy"), &AddPolicyOptions{
	Statement: agentcore.PolicyStatement_Permit().ForPrincipal(jsii.String("AgentCore::OAuthUser::your-client-id")).OnActions([]*string{
		jsii.String("AgentCore::Action::WeatherTool__get_forecast"),
		jsii.String("AgentCore::Action::WeatherTool__get_current"),
	}).OnResource(jsii.String("AgentCore::Gateway"), gateway.GatewayArn),
	Description: jsii.String("Allow specific weather tool operations"),
	ValidationMode: agentcore.PolicyValidationMode_FAIL_ON_ANY_FINDINGS(),
})

Policy with Conditions ​

Use when clauses to add advanced conditions based on principal tags (from OAuth token) or context:

ts
declare const policyEngine: agentcore.PolicyEngine;
declare const gateway: agentcore.Gateway;

// Policy with when conditions using principal tags
const conditionalPolicy = new agentcore.Policy(this, "ConditionalPolicy", {
  policyEngine: policyEngine,
  policyName: "conditional_access",
  statement: agentcore.PolicyStatement.permit()
    .forPrincipal('AgentCore::OAuthUser')  // Type constraint
    .onAllActions()
    .onResource('AgentCore::Gateway', gateway.gatewayArn)  // Specific ARN
    .when()
      .principalAttribute('department').equalTo('Engineering')
      .and()
      .contextAttribute('input.priority').equalTo('high')
      .done(),
  description: "Allow engineers for high-priority requests",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS,
});

// Generated Cedar:
// permit(
//   principal is AgentCore::OAuthUser,
//   action,
//   resource == AgentCore::Gateway::"arn:..."
// )
// when {
//   principal.department == "Engineering" && context.input.priority == "high"
// };
python
# policy_engine: agentcore.PolicyEngine
# gateway: agentcore.Gateway


# Policy with when conditions using principal tags
conditional_policy = agentcore.Policy(self, "ConditionalPolicy",
    policy_engine=policy_engine,
    policy_name="conditional_access",
    statement=agentcore.PolicyStatement.permit().for_principal("AgentCore::OAuthUser").on_all_actions().on_resource("AgentCore::Gateway", gateway.gateway_arn).when().principal_attribute("department").equal_to("Engineering").and().context_attribute("input.priority").equal_to("high").done(),
    description="Allow engineers for high-priority requests",
    validation_mode=agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS
)
java
PolicyEngine policyEngine;
Gateway gateway;


// Policy with when conditions using principal tags
Policy conditionalPolicy = Policy.Builder.create(this, "ConditionalPolicy")
        .policyEngine(policyEngine)
        .policyName("conditional_access")
        .statement(PolicyStatement.permit().forPrincipal("AgentCore::OAuthUser").onAllActions().onResource("AgentCore::Gateway", gateway.gatewayArn).when().principalAttribute("department").equalTo("Engineering").and().contextAttribute("input.priority").equalTo("high").done())
        .description("Allow engineers for high-priority requests")
        .validationMode(PolicyValidationMode.FAIL_ON_ANY_FINDINGS)
        .build();
csharp
PolicyEngine policyEngine;
Gateway gateway;


// Policy with when conditions using principal tags
var conditionalPolicy = new Policy(this, "ConditionalPolicy", new PolicyProps {
    PolicyEngine = policyEngine,
    PolicyName = "conditional_access",
    Statement = PolicyStatement.Permit().ForPrincipal("AgentCore::OAuthUser").OnAllActions().OnResource("AgentCore::Gateway", gateway.GatewayArn).When().PrincipalAttribute("department").EqualTo("Engineering").And().ContextAttribute("input.priority").EqualTo("high").Done(),
    Description = "Allow engineers for high-priority requests",
    ValidationMode = PolicyValidationMode.FAIL_ON_ANY_FINDINGS
});
go
var policyEngine PolicyEngine
var gateway Gateway


// Policy with when conditions using principal tags
conditionalPolicy := agentcore.NewPolicy(this, jsii.String("ConditionalPolicy"), &PolicyProps{
	PolicyEngine: policyEngine,
	PolicyName: jsii.String("conditional_access"),
	Statement: agentcore.PolicyStatement_Permit().ForPrincipal(jsii.String("AgentCore::OAuthUser")).OnAllActions().OnResource(jsii.String("AgentCore::Gateway"), gateway.GatewayArn).When().PrincipalAttribute(jsii.String("department")).EqualTo(jsii.String("Engineering")).And().ContextAttribute(jsii.String("input.priority")).*EqualTo(jsii.String("high")).Done(),
	Description: jsii.String("Allow engineers for high-priority requests"),
	ValidationMode: agentcore.PolicyValidationMode_FAIL_ON_ANY_FINDINGS(),
})

Policy with Exclusions (unless) ​

Use unless clauses to exclude specific conditions from a policy. The policy applies when the unless conditions are NOT met:

ts
declare const policyEngine: agentcore.PolicyEngine;
declare const gateway: agentcore.Gateway;

// Allow access unless the user is suspended
const policyWithUnless = new agentcore.Policy(this, "UnlessPolicy", {
  policyEngine: policyEngine,
  policyName: "unless_suspended",
  statement: agentcore.PolicyStatement.permit()
    .forPrincipal('AgentCore::OAuthUser')
    .onAllActions()
    .onResource('AgentCore::Gateway', gateway.gatewayArn)
    .unless()
      .principalAttribute('suspended').equalTo(true)
      .done(),
  description: "Allow all actions unless user is suspended",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS,
});

// Generated Cedar:
// permit(
//   principal is AgentCore::OAuthUser,
//   action,
//   resource == AgentCore::Gateway::"arn:..."
// )
// unless {
//   principal.suspended == true
// };
python
# policy_engine: agentcore.PolicyEngine
# gateway: agentcore.Gateway


# Allow access unless the user is suspended
policy_with_unless = agentcore.Policy(self, "UnlessPolicy",
    policy_engine=policy_engine,
    policy_name="unless_suspended",
    statement=agentcore.PolicyStatement.permit().for_principal("AgentCore::OAuthUser").on_all_actions().on_resource("AgentCore::Gateway", gateway.gateway_arn).unless().principal_attribute("suspended").equal_to(True).done(),
    description="Allow all actions unless user is suspended",
    validation_mode=agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS
)
java
PolicyEngine policyEngine;
Gateway gateway;


// Allow access unless the user is suspended
Policy policyWithUnless = Policy.Builder.create(this, "UnlessPolicy")
        .policyEngine(policyEngine)
        .policyName("unless_suspended")
        .statement(PolicyStatement.permit().forPrincipal("AgentCore::OAuthUser").onAllActions().onResource("AgentCore::Gateway", gateway.gatewayArn).unless().principalAttribute("suspended").equalTo(true).done())
        .description("Allow all actions unless user is suspended")
        .validationMode(PolicyValidationMode.FAIL_ON_ANY_FINDINGS)
        .build();
csharp
PolicyEngine policyEngine;
Gateway gateway;


// Allow access unless the user is suspended
var policyWithUnless = new Policy(this, "UnlessPolicy", new PolicyProps {
    PolicyEngine = policyEngine,
    PolicyName = "unless_suspended",
    Statement = PolicyStatement.Permit().ForPrincipal("AgentCore::OAuthUser").OnAllActions().OnResource("AgentCore::Gateway", gateway.GatewayArn).Unless().PrincipalAttribute("suspended").EqualTo(true).Done(),
    Description = "Allow all actions unless user is suspended",
    ValidationMode = PolicyValidationMode.FAIL_ON_ANY_FINDINGS
});
go
var policyEngine PolicyEngine
var gateway Gateway


// Allow access unless the user is suspended
policyWithUnless := agentcore.NewPolicy(this, jsii.String("UnlessPolicy"), &PolicyProps{
	PolicyEngine: policyEngine,
	PolicyName: jsii.String("unless_suspended"),
	Statement: agentcore.PolicyStatement_Permit().ForPrincipal(jsii.String("AgentCore::OAuthUser")).OnAllActions().OnResource(jsii.String("AgentCore::Gateway"), gateway.GatewayArn).Unless().PrincipalAttribute(jsii.String("suspended")).EqualTo(jsii.Boolean(true)).Done(),
	Description: jsii.String("Allow all actions unless user is suspended"),
	ValidationMode: agentcore.PolicyValidationMode_FAIL_ON_ANY_FINDINGS(),
})

You can combine when and unless clauses in the same policy:

ts
declare const policyEngine: agentcore.PolicyEngine;
declare const gateway: agentcore.Gateway;

// Allow engineers unless they are on probation
policyEngine.addPolicy("CombinedConditions", {
  statement: agentcore.PolicyStatement.permit()
    .forPrincipal('AgentCore::OAuthUser')
    .onAllActions()
    .onResource('AgentCore::Gateway', gateway.gatewayArn)
    .when()
      .principalAttribute('department').equalTo('Engineering')
      .done()
    .unless()
      .principalAttribute('status').equalTo('probation')
      .done(),
  description: "Allow engineers unless on probation",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS,
});
python
# policy_engine: agentcore.PolicyEngine
# gateway: agentcore.Gateway


# Allow engineers unless they are on probation
policy_engine.add_policy("CombinedConditions",
    statement=agentcore.PolicyStatement.permit().for_principal("AgentCore::OAuthUser").on_all_actions().on_resource("AgentCore::Gateway", gateway.gateway_arn).when().principal_attribute("department").equal_to("Engineering").done().unless().principal_attribute("status").equal_to("probation").done(),
    description="Allow engineers unless on probation",
    validation_mode=agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS
)
java
PolicyEngine policyEngine;
Gateway gateway;


// Allow engineers unless they are on probation
policyEngine.addPolicy("CombinedConditions", AddPolicyOptions.builder()
        .statement(PolicyStatement.permit().forPrincipal("AgentCore::OAuthUser").onAllActions().onResource("AgentCore::Gateway", gateway.gatewayArn).when().principalAttribute("department").equalTo("Engineering").done().unless().principalAttribute("status").equalTo("probation").done())
        .description("Allow engineers unless on probation")
        .validationMode(PolicyValidationMode.FAIL_ON_ANY_FINDINGS)
        .build());
csharp
PolicyEngine policyEngine;
Gateway gateway;


// Allow engineers unless they are on probation
policyEngine.AddPolicy("CombinedConditions", new AddPolicyOptions {
    Statement = PolicyStatement.Permit().ForPrincipal("AgentCore::OAuthUser").OnAllActions().OnResource("AgentCore::Gateway", gateway.GatewayArn).When().PrincipalAttribute("department").EqualTo("Engineering").Done().Unless().PrincipalAttribute("status").EqualTo("probation").Done(),
    Description = "Allow engineers unless on probation",
    ValidationMode = PolicyValidationMode.FAIL_ON_ANY_FINDINGS
});
go
var policyEngine PolicyEngine
var gateway Gateway


// Allow engineers unless they are on probation
policyEngine.AddPolicy(jsii.String("CombinedConditions"), &AddPolicyOptions{
	Statement: agentcore.PolicyStatement_Permit().ForPrincipal(jsii.String("AgentCore::OAuthUser")).OnAllActions().OnResource(jsii.String("AgentCore::Gateway"), gateway.GatewayArn).When().PrincipalAttribute(jsii.String("department")).EqualTo(jsii.String("Engineering")).Done().Unless().*PrincipalAttribute(jsii.String("status")).*EqualTo(jsii.String("probation")).*Done(),
	Description: jsii.String("Allow engineers unless on probation"),
	ValidationMode: agentcore.PolicyValidationMode_FAIL_ON_ANY_FINDINGS(),
})

Forbid (Deny) Policy ​

Use forbid to explicitly deny access. Forbid policies override permit policies.

ts
declare const policyEngine: agentcore.PolicyEngine;
declare const gateway: agentcore.Gateway;

// Explicitly deny dangerous tool operations
policyEngine.addPolicy("DenyDangerous", {
  statement: agentcore.PolicyStatement.forbid()
    .forAllPrincipals()
    .onAction('AgentCore::Action::DeleteTool__delete_all')
    .onResource('AgentCore::Gateway', gateway.gatewayArn),
  description: "Forbid delete_all operation for all users",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS,
});

// Generated Cedar:
// forbid(
//   principal,
//   action == AgentCore::Action::"DeleteTool__delete_all",
//   resource == AgentCore::Gateway::"arn:..."
// );
python
# policy_engine: agentcore.PolicyEngine
# gateway: agentcore.Gateway


# Explicitly deny dangerous tool operations
policy_engine.add_policy("DenyDangerous",
    statement=agentcore.PolicyStatement.forbid().for_all_principals().on_action("AgentCore::Action::DeleteTool__delete_all").on_resource("AgentCore::Gateway", gateway.gateway_arn),
    description="Forbid delete_all operation for all users",
    validation_mode=agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS
)
java
PolicyEngine policyEngine;
Gateway gateway;


// Explicitly deny dangerous tool operations
policyEngine.addPolicy("DenyDangerous", AddPolicyOptions.builder()
        .statement(PolicyStatement.forbid().forAllPrincipals().onAction("AgentCore::Action::DeleteTool__delete_all").onResource("AgentCore::Gateway", gateway.getGatewayArn()))
        .description("Forbid delete_all operation for all users")
        .validationMode(PolicyValidationMode.FAIL_ON_ANY_FINDINGS)
        .build());
csharp
PolicyEngine policyEngine;
Gateway gateway;


// Explicitly deny dangerous tool operations
policyEngine.AddPolicy("DenyDangerous", new AddPolicyOptions {
    Statement = PolicyStatement.Forbid().ForAllPrincipals().OnAction("AgentCore::Action::DeleteTool__delete_all").OnResource("AgentCore::Gateway", gateway.GatewayArn),
    Description = "Forbid delete_all operation for all users",
    ValidationMode = PolicyValidationMode.FAIL_ON_ANY_FINDINGS
});
go
var policyEngine PolicyEngine
var gateway Gateway


// Explicitly deny dangerous tool operations
policyEngine.AddPolicy(jsii.String("DenyDangerous"), &AddPolicyOptions{
	Statement: agentcore.PolicyStatement_Forbid().ForAllPrincipals().OnAction(jsii.String("AgentCore::Action::DeleteTool__delete_all")).OnResource(jsii.String("AgentCore::Gateway"), gateway.GatewayArn),
	Description: jsii.String("Forbid delete_all operation for all users"),
	ValidationMode: agentcore.PolicyValidationMode_FAIL_ON_ANY_FINDINGS(),
})

Raw Cedar for Advanced Cases ​

For advanced Cedar features not supported by the builder, use raw Cedar strings:

ts
declare const policyEngine: agentcore.PolicyEngine;

// Option 1: Using definition property
const advancedPolicy = new agentcore.Policy(this, "AdvancedPolicy", {
  policyEngine: policyEngine,
  definition: 'permit(principal, action, resource) when { context.custom > 10 };',
  description: "Advanced policy with custom Cedar logic",
});

// Option 2: Using fromCedar() with statement property
policyEngine.addPolicy("CustomPolicy", {
  statement: agentcore.PolicyStatement.fromCedar(
    'forbid(principal, action, resource) when { resource.confidential == true };'
  ),
  description: "Custom policy from Cedar string",
});
python
# policy_engine: agentcore.PolicyEngine


# Option 1: Using definition property
advanced_policy = agentcore.Policy(self, "AdvancedPolicy",
    policy_engine=policy_engine,
    definition="permit(principal, action, resource) when { context.custom > 10 };",
    description="Advanced policy with custom Cedar logic"
)

# Option 2: Using fromCedar() with statement property
policy_engine.add_policy("CustomPolicy",
    statement=agentcore.PolicyStatement.from_cedar("forbid(principal, action, resource) when { resource.confidential == true };"),
    description="Custom policy from Cedar string"
)
java
PolicyEngine policyEngine;


// Option 1: Using definition property
Policy advancedPolicy = Policy.Builder.create(this, "AdvancedPolicy")
        .policyEngine(policyEngine)
        .definition("permit(principal, action, resource) when { context.custom > 10 };")
        .description("Advanced policy with custom Cedar logic")
        .build();

// Option 2: Using fromCedar() with statement property
policyEngine.addPolicy("CustomPolicy", AddPolicyOptions.builder()
        .statement(PolicyStatement.fromCedar("forbid(principal, action, resource) when { resource.confidential == true };"))
        .description("Custom policy from Cedar string")
        .build());
csharp
PolicyEngine policyEngine;


// Option 1: Using definition property
var advancedPolicy = new Policy(this, "AdvancedPolicy", new PolicyProps {
    PolicyEngine = policyEngine,
    Definition = "permit(principal, action, resource) when { context.custom > 10 };",
    Description = "Advanced policy with custom Cedar logic"
});

// Option 2: Using fromCedar() with statement property
policyEngine.AddPolicy("CustomPolicy", new AddPolicyOptions {
    Statement = PolicyStatement.FromCedar("forbid(principal, action, resource) when { resource.confidential == true };"),
    Description = "Custom policy from Cedar string"
});
go
var policyEngine PolicyEngine


// Option 1: Using definition property
advancedPolicy := agentcore.NewPolicy(this, jsii.String("AdvancedPolicy"), &PolicyProps{
	PolicyEngine: policyEngine,
	Definition: jsii.String("permit(principal, action, resource) when { context.custom > 10 };"),
	Description: jsii.String("Advanced policy with custom Cedar logic"),
})

// Option 2: Using fromCedar() with statement property
policyEngine.AddPolicy(jsii.String("CustomPolicy"), &AddPolicyOptions{
	Statement: agentcore.PolicyStatement_FromCedar(jsii.String("forbid(principal, action, resource) when { resource.confidential == true };")),
	Description: jsii.String("Custom policy from Cedar string"),
})

Note: You must specify either definition (raw Cedar string) or statement (PolicyStatement builder), but not both.

Accessing Policies on PolicyEngine ​

You can access the list of policies added to a PolicyEngine using policyEngine.policies.

PolicyEngine with KMS Encryption ​

Encrypt policy data with a custom KMS key.

ts
// Create a custom KMS key
const policyKey = new kms.Key(this, "PolicyEngineKey", {
  enableKeyRotation: true,
  description: "KMS key for policy engine encryption",
});

// Create policy engine with encryption
const policyEngine = new agentcore.PolicyEngine(this, "EncryptedEngine", {
  policyEngineName: "encrypted_engine",
  description: "Policy engine with KMS encryption",
  kmsKey: policyKey,
});
python
# Create a custom KMS key
policy_key = kms.Key(self, "PolicyEngineKey",
    enable_key_rotation=True,
    description="KMS key for policy engine encryption"
)

# Create policy engine with encryption
policy_engine = agentcore.PolicyEngine(self, "EncryptedEngine",
    policy_engine_name="encrypted_engine",
    description="Policy engine with KMS encryption",
    kms_key=policy_key
)
java
// Create a custom KMS key
Key policyKey = Key.Builder.create(this, "PolicyEngineKey")
        .enableKeyRotation(true)
        .description("KMS key for policy engine encryption")
        .build();

// Create policy engine with encryption
PolicyEngine policyEngine = PolicyEngine.Builder.create(this, "EncryptedEngine")
        .policyEngineName("encrypted_engine")
        .description("Policy engine with KMS encryption")
        .kmsKey(policyKey)
        .build();
csharp
// Create a custom KMS key
var policyKey = new Key(this, "PolicyEngineKey", new KeyProps {
    EnableKeyRotation = true,
    Description = "KMS key for policy engine encryption"
});

// Create policy engine with encryption
var policyEngine = new PolicyEngine(this, "EncryptedEngine", new PolicyEngineProps {
    PolicyEngineName = "encrypted_engine",
    Description = "Policy engine with KMS encryption",
    KmsKey = policyKey
});
go
// Create a custom KMS key
policyKey := kms.NewKey(this, jsii.String("PolicyEngineKey"), &KeyProps{
	EnableKeyRotation: jsii.Boolean(true),
	Description: jsii.String("KMS key for policy engine encryption"),
})

// Create policy engine with encryption
policyEngine := agentcore.NewPolicyEngine(this, jsii.String("EncryptedEngine"), &PolicyEngineProps{
	PolicyEngineName: jsii.String("encrypted_engine"),
	Description: jsii.String("Policy engine with KMS encryption"),
	KmsKey: policyKey,
})

Importing Existing PolicyEngine ​

Import an existing policy engine from its ARN:

ts
const importedEngine = agentcore.PolicyEngine.fromPolicyEngineAttributes(
  this,
  "ImportedEngine",
  {
    policyEngineArn: "policy-engine-arn",
    kmsKeyArn: "kms-arn",
  }
);

// Use the imported engine
const policy = new agentcore.Policy(this, "PolicyForImportedEngine", {
  policyEngine: importedEngine,
  definition: "permit(principal, action, resource);",
});
python
imported_engine = agentcore.PolicyEngine.from_policy_engine_attributes(self, "ImportedEngine",
    policy_engine_arn="policy-engine-arn",
    kms_key_arn="kms-arn"
)

# Use the imported engine
policy = agentcore.Policy(self, "PolicyForImportedEngine",
    policy_engine=imported_engine,
    definition="permit(principal, action, resource);"
)
java
IPolicyEngine importedEngine = PolicyEngine.fromPolicyEngineAttributes(this, "ImportedEngine", PolicyEngineAttributes.builder()
        .policyEngineArn("policy-engine-arn")
        .kmsKeyArn("kms-arn")
        .build());

// Use the imported engine
Policy policy = Policy.Builder.create(this, "PolicyForImportedEngine")
        .policyEngine(importedEngine)
        .definition("permit(principal, action, resource);")
        .build();
csharp
var importedEngine = PolicyEngine.FromPolicyEngineAttributes(this, "ImportedEngine", new PolicyEngineAttributes {
    PolicyEngineArn = "policy-engine-arn",
    KmsKeyArn = "kms-arn"
});

// Use the imported engine
var policy = new Policy(this, "PolicyForImportedEngine", new PolicyProps {
    PolicyEngine = importedEngine,
    Definition = "permit(principal, action, resource);"
});
go
importedEngine := agentcore.PolicyEngine_FromPolicyEngineAttributes(this, jsii.String("ImportedEngine"), &PolicyEngineAttributes{
	PolicyEngineArn: jsii.String("policy-engine-arn"),
	KmsKeyArn: jsii.String("kms-arn"),
})

// Use the imported engine
policy := agentcore.NewPolicy(this, jsii.String("PolicyForImportedEngine"), &PolicyProps{
	PolicyEngine: importedEngine,
	Definition: jsii.String("permit(principal, action, resource);"),
})

Importing Existing Policy ​

Import an existing policy from its ARN:

ts
const importedEngine = agentcore.PolicyEngine.fromPolicyEngineAttributes(
  this,
  "ImportedEngine",
  {
    policyEngineArn: "policy-engine/my-engine-id",
  }
);

const importedPolicy = agentcore.Policy.fromPolicyAttributes(
  this,
  "ImportedPolicy",
  {
    policyArn: "my-policy-arn",
    policyEngine: importedEngine,
  }
);

// Grant permissions to the imported policy
const role = new iam.Role(this, "PolicyRole", {
  assumedBy: new iam.ServicePrincipal("lambda.amazonaws.com"),
});

importedPolicy.grantRead(role);
python
imported_engine = agentcore.PolicyEngine.from_policy_engine_attributes(self, "ImportedEngine",
    policy_engine_arn="policy-engine/my-engine-id"
)

imported_policy = agentcore.Policy.from_policy_attributes(self, "ImportedPolicy",
    policy_arn="my-policy-arn",
    policy_engine=imported_engine
)

# Grant permissions to the imported policy
role = iam.Role(self, "PolicyRole",
    assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
)

imported_policy.grant_read(role)
java
IPolicyEngine importedEngine = PolicyEngine.fromPolicyEngineAttributes(this, "ImportedEngine", PolicyEngineAttributes.builder()
        .policyEngineArn("policy-engine/my-engine-id")
        .build());

IPolicy importedPolicy = Policy.fromPolicyAttributes(this, "ImportedPolicy", PolicyAttributes.builder()
        .policyArn("my-policy-arn")
        .policyEngine(importedEngine)
        .build());

// Grant permissions to the imported policy
Role role = Role.Builder.create(this, "PolicyRole")
        .assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
        .build();

importedPolicy.grantRead(role);
csharp
var importedEngine = PolicyEngine.FromPolicyEngineAttributes(this, "ImportedEngine", new PolicyEngineAttributes {
    PolicyEngineArn = "policy-engine/my-engine-id"
});

var importedPolicy = Policy.FromPolicyAttributes(this, "ImportedPolicy", new PolicyAttributes {
    PolicyArn = "my-policy-arn",
    PolicyEngine = importedEngine
});

// Grant permissions to the imported policy
var role = new Role(this, "PolicyRole", new RoleProps {
    AssumedBy = new ServicePrincipal("lambda.amazonaws.com")
});

importedPolicy.GrantRead(role);
go
importedEngine := agentcore.PolicyEngine_FromPolicyEngineAttributes(this, jsii.String("ImportedEngine"), &PolicyEngineAttributes{
	PolicyEngineArn: jsii.String("policy-engine/my-engine-id"),
})

importedPolicy := agentcore.Policy_FromPolicyAttributes(this, jsii.String("ImportedPolicy"), &PolicyAttributes{
	PolicyArn: jsii.String("my-policy-arn"),
	PolicyEngine: importedEngine,
})

// Grant permissions to the imported policy
role := iam.NewRole(this, jsii.String("PolicyRole"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})

importedPolicy.GrantRead(role)

PolicyEngine IAM Permissions ​

Grant various levels of access to policy engines:

ts
const policyEngine = new agentcore.PolicyEngine(this, "MyEngine", {
  policyEngineName: "my_engine",
});

const lambdaRole = new iam.Role(this, "LambdaRole", {
  assumedBy: new iam.ServicePrincipal("lambda.amazonaws.com"),
});

// Grant read permissions
policyEngine.grantRead(lambdaRole);

// Grant evaluation permissions
policyEngine.grantEvaluate(lambdaRole);
python
policy_engine = agentcore.PolicyEngine(self, "MyEngine",
    policy_engine_name="my_engine"
)

lambda_role = iam.Role(self, "LambdaRole",
    assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
)

# Grant read permissions
policy_engine.grant_read(lambda_role)

# Grant evaluation permissions
policy_engine.grant_evaluate(lambda_role)
java
PolicyEngine policyEngine = PolicyEngine.Builder.create(this, "MyEngine")
        .policyEngineName("my_engine")
        .build();

Role lambdaRole = Role.Builder.create(this, "LambdaRole")
        .assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
        .build();

// Grant read permissions
policyEngine.grantRead(lambdaRole);

// Grant evaluation permissions
policyEngine.grantEvaluate(lambdaRole);
csharp
var policyEngine = new PolicyEngine(this, "MyEngine", new PolicyEngineProps {
    PolicyEngineName = "my_engine"
});

var lambdaRole = new Role(this, "LambdaRole", new RoleProps {
    AssumedBy = new ServicePrincipal("lambda.amazonaws.com")
});

// Grant read permissions
policyEngine.GrantRead(lambdaRole);

// Grant evaluation permissions
policyEngine.GrantEvaluate(lambdaRole);
go
policyEngine := agentcore.NewPolicyEngine(this, jsii.String("MyEngine"), &PolicyEngineProps{
	PolicyEngineName: jsii.String("my_engine"),
})

lambdaRole := iam.NewRole(this, jsii.String("LambdaRole"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
})

// Grant read permissions
policyEngine.GrantRead(lambdaRole)

// Grant evaluation permissions
policyEngine.GrantEvaluate(lambdaRole)

Types ​

Constructs (L2) ​

  • ApiKeyCredentialProvider Construct (L2)
    L2 construct for AWS::BedrockAgentCore::ApiKeyCredentialProvider.
  • BrowserCustom Construct (L2)
    Browser resource for AWS Bedrock Agent Core.
  • BrowserCustomBase Construct (L2)
    Abstract base class for a Browser.
  • CodeInterpreterCustom Construct (L2)
    Custom code interpreter resource for AWS Bedrock Agent Core.
  • CodeInterpreterCustomBase Construct (L2)
    Abstract base class for a Code Interpreter.
  • Evaluator Construct (L2)
    A custom evaluator for Amazon Bedrock AgentCore.
  • EvaluatorBase Construct (L2)
    Abstract base class for Evaluator.
  • Gateway Construct (L2)
    Gateway resource for AWS Bedrock Agent Core.
  • GatewayBase Construct (L2)
    Base class for Gateway constructs.
  • GatewayTarget Construct (L2)
    Defines tools that your gateway will host.
  • GatewayTargetBase Construct (L2)
    Base class for gateway target implementations.
  • Memory Construct (L2)
    Long-term memory store for extracted insights like user preferences, semantic facts and summaries.
  • MemoryBase Construct (L2)
    Abstract base class for a Memory.
  • OAuth2CredentialProvider Construct (L2)
    L2 construct for AWS::BedrockAgentCore::OAuth2CredentialProvider.
  • OnlineEvaluationBase Construct (L2)
    Abstract base class for OnlineEvaluationConfig.
  • OnlineEvaluationConfig Construct (L2)
    Online evaluation configuration for Amazon Bedrock AgentCore.
  • Policy Construct (L2)
    Individual Cedar policy defining what agents can access.
  • PolicyBase Construct (L2)
    Abstract base class for a Policy.
  • PolicyEngine Construct (L2)
    Container that manages Cedar authorization policies associated with gateways.
  • PolicyEngineBase Construct (L2)
    Abstract base class for a PolicyEngine.
  • Runtime Construct (L2)
    Bedrock Agent Core Runtime Enables running containerized agents with specific network configurations, security settings, and runtime artifacts.
  • RuntimeBase Construct (L2)
    Base class for Agent Runtime.
  • RuntimeEndpoint Construct (L2)
    Bedrock Agent Core Runtime Endpoint Provides a stable endpoint for invoking agent runtimes with versioning support.
  • RuntimeEndpointBase Construct (L2)
    Base class for Runtime Endpoint.
  • WorkloadIdentity Construct (L2)
    L2 construct for AWS::BedrockAgentCore::WorkloadIdentity.

Structs ​

Enums ​

Classes ​

Interfaces ​