> For the complete documentation index, see [llms.txt](https://www.techwithtyler.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.techwithtyler.dev/cloud-security/aws/aws-offensive-security/aws-attacks-and-techniques/data-poisoning-bedrock-knowledge-base.md).

# Data Poisoning - Bedrock Knowledge Base

## Overview

* Amazon Bedrock Knowledge Bases can leverage data from multiple sources e.g., S3, Salesforce, and more
* This data may support critical operations such as customer service agents, internal references, and more
* If attackers can gain access to and/or modify the data, it can impact these workloads

### Resync Data Source

* Once data is modified (e.g., an attacker corrupts data in an S3 bucket), the knowledge base will need to resync with the data source

{% code overflow="wrap" %}

```zsh
aws bedrock-agent start-ingestion-job --knowledge-base-id <knowledge-base-id> --data-source-id <data-source-id>
```

{% endcode %}

* Get knowledge base id from `aws bedrock-agent list-knowledge-bases`
* Get data source id from `aws bedrock-agent list-data-sources --knowledge-base-id <knowledge-base-id>`
