{"id":26751,"library":"aws-cdk-aws-bedrock-agentcore-alpha","title":"AWS CDK Bedrock AgentCore (Alpha)","description":"The AWS CDK Construct Library for Amazon Bedrock (agent core) in an alpha state. Currently at version 2.252.0a0, it allows defining Bedrock agents, action groups, knowledge bases, and AI guardrails with the CDK. This module has a release cadence that tracks the main aws-cdk library, and breaking changes can occur as it is in alpha.","status":"active","version":"2.252.0a0","language":"python","source_language":"en","source_url":"https://github.com/aws/aws-cdk","tags":["aws","cdk","bedrock","agent","alpha","infrastructure"],"install":[{"cmd":"pip install aws-cdk-aws-bedrock-agentcore-alpha","lang":"bash","label":"Stable install"}],"dependencies":[{"reason":"Core CDK library required for constructs and stacks","package":"aws-cdk-lib","optional":false},{"reason":"Required base class for CDK constructs","package":"constructs","optional":false}],"imports":[{"note":"The module is alpha and has a different import path.","wrong":"from aws_cdk.aws_bedrock_agent import BedrockAgent","symbol":"BedrockAgent","correct":"from aws_cdk.aws_bedrock_agentcore_alpha import BedrockAgent"},{"note":"Older import paths may not exist or may have been renamed.","wrong":"from aws_cdk.aws_bedrock_agentcore import ActionGroup","symbol":"ActionGroup","correct":"from aws_cdk.aws_bedrock_agentcore_alpha import ActionGroup"},{"note":"","wrong":null,"symbol":"KnowledgeBase","correct":"from aws_cdk.aws_bedrock_agentcore_alpha import KnowledgeBase"},{"note":"","wrong":null,"symbol":"Guardrail","correct":"from aws_cdk.aws_bedrock_agentcore_alpha import Guardrail"},{"note":"","wrong":null,"symbol":"S3DataSource","correct":"from aws_cdk.aws_bedrock_agentcore_alpha import S3DataSource"}],"quickstart":{"code":"from aws_cdk import App, Stack\nfrom aws_cdk.aws_bedrock_agentcore_alpha import BedrockAgent\n\napp = App()\nstack = Stack(app, \"MyStack\")\nagent = BedrockAgent(stack, \"MyAgent\",\n    foundation_model=\"anthropic.claude-v2\",\n    instruction=\"You are a helpful assistant.\",\n    idle_ttl_in_seconds=600\n)\napp.synth()","lang":"python","description":"Create a simple Bedrock agent with default settings."},"warnings":[{"fix":"Use a pinned version like 2.252.0a0 and test upgrades.","message":"Alpha modules do not follow semantic versioning; breaking changes may occur between minor/patch releases. Pin your version appropriately.","severity":"gotcha","affected_versions":"all alpha versions"},{"fix":"Use `from aws_cdk.aws_bedrock_agentcore_alpha import ...`","message":"Import paths for alpha modules use `aws_cdk.aws_bedrock_agentcore_alpha` (note: `alpha` suffix). Users often miss the suffix and import incorrectly.","severity":"gotcha","affected_versions":"all"},{"fix":"Check the latest API docs for correct property names.","message":"Some older property names like `lambda_` for Lambda function ARNs are deprecated in favor of `lambda_function_arn` or similar.","severity":"deprecated","affected_versions":">=2.200.0a0"},{"fix":"Use `FoundationModel.from_foundation_model_id('anthropic.claude-v2')` or similar.","message":"The `foundation_model` property used to accept a string like 'anthropic.claude-v2' but now may require a `FoundationModel` object in newer versions.","severity":"breaking","affected_versions":">=2.250.0a0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install aws-cdk-aws-bedrock-agentcore-alpha","cause":"Library not installed or installed under a different distribution name.","error":"ModuleNotFoundError: No module named 'aws_cdk.aws_bedrock_agentcore_alpha'"},{"fix":"Check the exact class name in the version you installed. Try: from aws_cdk.aws_bedrock_agentcore_alpha import CfnAgent","cause":"Wrong import or the symbol does not exist in that version; possibly a rename.","error":"ImportError: cannot import name 'BedrockAgent' from 'aws_cdk.aws_bedrock_agentcore_alpha'"},{"fix":"Check the latest API docs and use the correct property. For recent versions: model=FoundationModel.from_foundation_model_id('anthropic.claude-v2')","cause":"The property name has changed between versions (e.g., to 'model' or 'foundation_model_id').","error":"TypeError: __init__() got an unexpected keyword argument 'foundation_model'"},{"fix":"Ensure all required properties are provided, e.g., `instruction` must not be empty.","cause":"A required argument is missing or set to None when it should be a string.","error":"JSIIError: jsii.errors.JSIIError: Expected a string, got undefined"},{"fix":"Use .agent_arn to get the ARN after deployment, or check the correct property name.","cause":"The property is called 'agentArn' or does not exist until the agent is deployed.","error":"AttributeError: 'BedrockAgent' object has no attribute 'agent_id'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}