Skip to content

AWS Audit: connect your account

The AWS Audit reads your account without changing anything and shows what is vulnerable and what can improve. To let it in, you create a read-only role and a service user in your account, with a template that the floor itself hands you already filled in. IAM resources cost nothing on AWS.

Before you start:

  • access to the AWS console with permission to create a CloudFormation stack with IAM resources (never the root);
  • the AWS Audit diskette loaded on a floor, and you as the tower owner.

Time: about 10 minutes.

1. In Husvord: download the template

  1. In the floor's drive, find the AWS Audit diskette (it shows up as auditoria-aws) and click Configure (once it is configured, the button is called Configuration). If Husvord asks, sign in again: editing the configuration requires a sign-in less than 5 minutes old.
  2. Copy the ExternalId, just to check it later.
  3. Click Download on the template. The file already carries the ExternalId of this connection.

2. In AWS: create the stack

  1. CloudFormation → Create stack → With new resources → Upload a template file → choose the downloaded file. Use a single region (for example, us-east-1; IAM is global).
  2. Stack name: husvord-auditoria.
  3. Parameters:
    • ExternalId: already filled in. Do not change it.
    • NomeDaRole: HusvordAuditoria.
    • ContaDoUsuario: empty (single account).
  4. Tick «I acknowledge that AWS CloudFormation might create IAM resources with custom names» → Submit.
  5. Wait for the CREATE_COMPLETE status.

3. Copy the role ARN

In the stack, Outputs tab, copy the value of RoleArn.

4. Create the service user's key

  1. IAM → Users → husvord-auditoria → Security credentials → Create access key.
  2. Use case: «Third-party service».
  3. Copy the Access key ID and the Secret access key. The secret is shown only once.

Create only one key. If the user has two keys, the run stops right at the first step and asks you to delete the one you did not enter.

5. Back in Husvord: fill in and test

In the AWS Audit configuration:

Field What to enter
What to audit The role's account
Audit role ARN the RoleArn from step 3
Service user in AWS husvord-auditoria (already filled in)
Access key ID the Access key ID from step 4 (it starts with AKIA)
Secret access key the Secret access key from step 4
Accounts to audit empty (= the role's account)
Regions empty (= all regions enabled in the account, up to 20 per run)
Anthropic API key only if, when loading, you chose «My own key» for the AI (see the note in step 7)

Click Save and test. Husvord tests right away whether it can assume the role with the ExternalId and, if it works, the status turns Configured.

The key goes straight to your tower's secret store. Never send it by chat, e-mail or file.

6. If the test fails

The screen shows the reason:

Code What to do
chave-invalida the key was copied wrong, is inactive or was deleted: check both values or create another one and save again
role-ou-external-id check three things: the role ARN exists in this account; the stack was created with the ExternalId of this configuration; and the role trusts the husvord-auditoria user (AWS does not say which of the three failed)
sem-assume-role the key does not belong to the husvord-auditoria user
tempo-esgotado AWS did not answer in time: save again in a moment
desconhecido try again in a moment

7. Run the audit and see the report

With the configuration Configured, the tower owner clicks Run audit in the floor's drive. Each click is a run, and only one runs at a time. The run shows its steps: connect, inventory, Prowler, consolidate, AI analysis and report with analysis.

  • Inventory: the resources of each account, region by region, plus the global services. A region that does not respond is left out and shows up in the report.
  • Security: Prowler runs in each region of the run.
  • Report without AI: as soon as the collection finishes, the report (HTML and JSON) goes to the floor's library, marked «no analysis».
  • Analysis by the agents: an analyst, a writer and a verifier work only with the run's data (with no access to your account) and write the analysis across the 6 Well-Architected pillars (or security only, at the quick depth). When it passes the checks, the report in the library is replaced by the «with analysis» version. If the analysis fails, the report without AI stays.
  • Check before publishing: no report is published with a secret or another account's data in the text. The version with analysis also requires each finding to point to a resource in the inventory and to a check that ran.

The report language and the depth (quick or full) are chosen when loading the diskette.

Coming soon:

  • Analysis with your own AI key. If, when loading, you chose «My own key», today the analysis by the agents does not run yet: the run ends with the report without AI.
  • Repeat every month. Today every run is requested by the tower owner with the Run audit button.
  • Automatic key rotation every 90 days. Until then, rotate the key yourself: create the new one in IAM, save it in the configuration (the test runs again) and delete the old one.

Several accounts (organization)

  1. Apply the template first in the account where the user will live, with ContaDoUsuario empty.
  2. In the other accounts, use a StackSet with the same template, the same ExternalId, NomeDaRole HusvordAuditoria and ContaDoUsuario = the user's account number (12 digits). In those accounts the template creates only the role. Use a single region: with two, the second fails, because the role name is unique in the account.
  3. In Husvord, under What to audit, choose Several accounts in the organization and list the accounts (12 digits, comma-separated). If you also want to audit the user's account, include it in the list.

What Husvord sees and what it does not

  • The role is read-only (the AWS policies SecurityAudit and ViewOnlyAccess), with an explicit deny on data content: S3 objects, secrets, SSM parameters, KMS decryption, DynamoDB items, logs, Athena results, RDS Data queries, SQS and Kinesis messages, EC2 instance passwords, Lambda and CodeCommit code and ECR images.
  • The key stays in your tower's secret store: it never comes back to the screen, and the run's steps do not receive it.
  • Each read uses a temporary credential valid for 1 hour.
  • Costs: today the audit does not estimate amounts. When a recommendation turns on a paid service, the report warns that it may generate cost on AWS.

What not to do

  • Use the root or create a root key.
  • Grant AdministratorAccess, ReadOnlyAccess (it reads content, such as S3 files) or PowerUserAccess.
  • Remove the content deny or the role's ExternalId condition.
  • Create a second key for the user.
  • Turn on paid services (Cost Explorer, Config, Security Hub) because of the audit: it uses what is already on, and what is missing becomes a recommendation in the report.

How to turn it off

Delete the husvord-auditoria stack (and the StackSet, if you used one). Access ends immediately.