> For the complete documentation index, see [llms.txt](https://docs.panther.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.panther.com/~/changes/Dd8nx2iqd1Pp2OzWJaWk/alerts/alert-runbooks/built-in-policies/aws-access-keys-are-not-created-at-account-creation.md).

# AWS Access Keys not Created During Account Creation

| Risk    | Remediation Effort |
| ------- | ------------------ |
| **Low** | **Low**            |

This policy validates that AWS IAM user accounts do not have access keys that were created during account creation.

If IAM access keys are not being used, they should not exist. Creating access keys at the time of account creation generally leads to outdated access keys being created over time. As a best practice, it is recommended to create account access keys as part of an explicit and separate process from account creation.

**Remediation**

To remediate this, disable or delete all access keys that were created at account creation that are not in use, and rotate any access keys that were created at account creation and are still in use. Be sure to document this activity per your standard AWS access key request process.

| Using the AWS Console                                                                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1. Navigate to the [AWS IAM Console](https://console.aws.amazon.com/iam/home#/users).                                                                                                                                                          |
| 2. Select the user with access keys that were created at account creation.                                                                                                                                                                     |
| 3. Select the "Security credentials" tab.                                                                                                                                                                                                      |
| 4. Under the "Access keys" header, select the "Make inactive" button or the "X" icon delete button of the first access key if it is not in use.                                                                                                |
| 5. If the access key is in use rotate the access key by first creating a new access key, switching over any scripts/programmatic access to use the new access key, verify that the new access key is working, then take the actions in step 4. |

| Using the AWS CLI                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1. To delete an unnecessary access key, run the following command:                                                                                                                                                                                    |
| `aws iam delete-access-key --user-name <user_name> --access-key-id <access_key_id>`                                                                                                                                                                   |
| 2. To alternatively rotate a key instead of deleting it, view the remediation steps for [AWS Access Keys are Rotated Every 90 Days](/~/changes/Dd8nx2iqd1Pp2OzWJaWk/alerts/alert-runbooks/built-in-policies/aws-access-keys-rotated-every-90-days.md) |

**References**

* CIS AWS Benchmark 1.21 "Do not setup access keys during initial user setup for all IAM users that have a console password"


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.panther.com/~/changes/Dd8nx2iqd1Pp2OzWJaWk/alerts/alert-runbooks/built-in-policies/aws-access-keys-are-not-created-at-account-creation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
