You can enable s3 archiving for your logs as follows.
1. Configure S3 bucket
Sign in to AWS Management Console
Click services on the menu bar, click S3 under storage tab. Create new S3 bucket.
Open your bucket and click to Permissions tab, then scroll down and click the edit option in the Access control list (ACL).
In the Access for other AWS accounts section, click Add grantee.
Enter your following canonicalId in the grantee.
35fac91505d5613b62b21808b774336fcc4c38835dd63b3f799dfd7b109cc217
Under the
Objects
column, select the List and Write.Click Save changes.
(OR) Using Bucket Policy Json
In above procedure instead of step 5 (canonicalId in the grantee) you can use below json. Replace YOUR_BUCKET_NAME
with your bucket name.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AtatusLogBucketPermission",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::431904702782:user/s3-archiver"
},
"Action": [
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME"
},
{
"Sid": "AtatusLogObjectPermission",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::431904702782:user/s3-archiver"
},
"Action": [
"s3:DeleteObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
}
]
}
2. Set up archive in Atatus dashboard
Navigate to Logs -> Settings -> Archives.
Click Create New Archive button.
Enter your S3 Bucket name.
Enter your archive name then click Save.