- Newest
- Most votes
- Most comments
Hello.
To check events such as putobject in S3, you need to configure CloudTrail to record data events.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-cloudtrail-logging-for-s3.html
Although you cannot view the API history, I think enabling S3 access logs is a good way to understand the number of requests to a certain extent.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html
However, these settings can only be recorded from the day they are enabled, so you cannot check past request history.
Hi @Riku
I enabled server access log but after this I'm getting a lot of log files with similar informations inside of them...
Not sure to get all API calls.
I followed policy below which seems to log only put request:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "S3ServerAccessLogsPolicy",
"Effect": "Allow",
"Principal": {
"Service": "logging.s3.amazonaws.com"
},
"Action": [
"s3:PutObject"
],
"Resource": "arn:aws:s3:::DOC-EXAMPLE-DESTINATION-BUCKET/EXAMPLE-LOGGING-PREFIX*",
"Condition": {
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:::DOC-EXAMPLE-SOURCE-BUCKET"
},
"StringEquals": {
"aws:SourceAccount": "SOURCE-ACCOUNT-ID"
}
}
}
]
}
Relevant content
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago