Skip to content

Commit

Permalink
fix: billing extract tags IAM role and S3 prefix (#319)
Browse files Browse the repository at this point in the history
Update billing extract tags to allow it to write to write to the correct
prefix in the data lake bucket.
  • Loading branch information
patheard authored Nov 7, 2024
1 parent e0d782e commit 9ac67f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terragrunt/org_account/cost_usage_report/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ data "aws_iam_policy_document" "billing_extract_tags" {
"s3:PutObject"
]
resources = [
"${local.data_lake_raw_s3_bucket_arn}/operations/aws/organization/account-tags.json",
"${local.data_lake_raw_s3_bucket_arn}/operations/aws/organization/*",
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ def handler(event, context):

# save accounts to an s3 bucket
logging.info("Saving account tags to s3")
s3.put_object(Bucket=TARGET_BUCKET, Key="/operations/aws/organization/account-tags.json", Body=accounts)
s3.put_object(Bucket=TARGET_BUCKET, Key="operations/aws/organization/account-tags.json", Body=accounts)

return {"statusCode": 200}

0 comments on commit 9ac67f2

Please sign in to comment.