> For the complete documentation index, see [llms.txt](https://docs.firefly.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firefly.ai/integrations/version-control/codecommit.md).

# CodeCommit

Firefly integrates with AWS CodeCommit to connect your infrastructure code repositories with your cloud resources. This integration enables powerful features like tracing cloud resources back to their defining code ("Jump to Code") and automatically creating Pull Requests for newly codified resources and drift remediation.

## Prerequisites

* An AWS account with access to your infrastructure repositories in CodeCommit.
* Appropriate permissions to create IAM roles and CloudFormation stacks.
* Repositories containing Terraform, CloudFormation, or other IaC files you want to connect to Firefly.

## Setup Procedure

1. Log in to your AWS account with permission to create CloudFormation and IAM AWS resources.
2. Copy your AWS account ID (located at the top right corner of the AWS console) to the clipboard.
3. In Firefly, click **Settings > Integrations**.
4. Click **Add New > AWS CodeCommit**.
5. Enter a descriptive name in the **Nickname** field.
6. Paste the AWS account ID.
7. Click **Launch Stack**.
8. Click **Done**.

## Features Enabled

* **Jump to Code**: Trace resources in your cloud inventory back to the CodeCommit file and specific line that defines them.
* **Automated Pull Requests**: When Firefly codifies an unmanaged resource, it can commit the new infrastructure code as a Pull Request.
* **IaC Tracking**: Firefly maintains awareness of which resources are defined in code and which are not.
* **Drift Remediation**: Firefly can detect drift between the code and the actual resources and create a Pull Request to fix it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.firefly.ai/integrations/version-control/codecommit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
