Cost Breakdown by IAM Role

0

Hello,

We are using a number of services which are accessing data from AWS S3 via IAM Roles and Credentials. We are looking to get a breakdown of the costs by each IAM role for the data transfer. Is there a way to get a breakdown of costs by the IAM role? Alternatively, what would be the best way to find the API calls that are billed by AWS for data transfer.

Thanks,

2 Answers
1

Hello,

To analyze S3 usage by IAM role, enable server access logging for the bucket(s) in scope as described here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html

Once access logging is setup, you may use AWS Athena to query the logs and identify operations by each IAM role. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-s3-access-logs-to-identify-requests.html#querying-s3-access-logs-for-requests for information re: how to setup Athena along with example queries.

profile pictureAWS
answered a year ago
0

Hi,

AWS Cost Explorer and AWS Cost and Usage Report (CUR) is something you can look at. Here's the guidance on how to analyse the costs on API calls in S3. https://aws.amazon.com/blogs/storage/optimize-storage-costs-by-analyzing-api-operations-on-amazon-s3/

AWS
Arun
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions