Support contextEnrichmentConfiguration in aws_bedrockagent_data_source to enable neptune-analytics as a knowledgebase
Author: jdpfcbCreated Sep 21, 2026Updated Sep 26, 2026
Labelsenhancementservice/bedrockagent
Description
When aws_bedrockagent_knowledge_base is configured to used a storage_configuration of type NEPTUNE_ANALYTICS, then any associated aws_bedrockagent_data_source resources will fail to create with an apply-time error from the AWS API that:
ValidationException: ContextEnrichmentConfiguration is required when using Neptune Analytics as a Knowledge Base
The aws_bedrockagent_data_source resource does not currently have support for contextEnrichmentConfiguration and it is therefore not possible to associate a data_source with a neptune-analytics-backed knowledge base.
Affected Resource(s) or Data Source(s)
aws_bedrockagent_knowledge_baseaws_bedrockagent_data_source
Potential Terraform Configuration
resource "aws_bedrockagent_data_source" "example" {
knowledge_base_id = aws_bedrockagent_knowledge_base.example.id
name = "multimodal-example"
data_source_configuration {
...
}
vector_ingestion_configuration {
...
context_enrichment_configuration {
type = "BEDROCK_FOUNDATION_MODEL"
bedrock_foundation_model_configuration {
model_arn = "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-sonnet-20240229-v1:0"
enrichment_strategy_configuration {
method = "CHUNK_ENTITY_EXTRACTION"
}
}
}
}
}References
- https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_ContextEnrichmentConfiguration.html
- https://docs.aws.amazon.com/cli/latest/reference/bedrock-agent/create-data-source.html
- https://github.com/aws/aws-sdk-go-v2/blob/901c19d7519374f3505586eddd3c3c7a4c3713a5/service/bedrockagent/response_snapshot_test.go#L846
Would you like to implement the enhancement?
No
Source: hashicorp/terraform-provider-aws