I need to track the amount of data my (logged in) users transfer out of the AWS EC2. I am storing the data on S3, usually 200-300mb per file, so I need to be in control of what account should be limited, etc ...
Any help will be much appreciated!
I need to track the amount of data my (logged in) users transfer out of the AWS EC2. I am storing the data on S3, usually 200-300mb per file, so I need to be in control of what account should be limited, etc ...
Any help will be much appreciated!
You probably want to turn on server access logging, which will put very detailed log files into an S3 bucket of your choice which you can then analyze at your convenience to figure out who is using up the most resources.
http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html
and here is the information it will log for you:
http://docs.aws.amazon.com/AmazonS3/latest/dev/LogFormat.html
If the default information is not sufficient, you can tag each logged request with extra information to be included on each logged record, like the users id if you want:
Custom Access Log Information
You can include custom information to be stored in the access log record for a request by adding a custom query-string parameter to the URL for the request. Amazon S3 will ignore query-string parameters that begin with "x-", but will include those parameters in the access log record for the request, as part of the Request-URI field of the log record. For example, a GET request for "s3.amazonaws.com/mybucket/photos/2014/08/puppy.jpg?x-user=johndoe" will work the same as the same request for "s3.amazonaws.com/mybucket/photos/2014/08/puppy.jpg", except that the "x-user=johndoe" string will be included in the Request-URI field for the associated log record. This functionality is available in the REST interface only.