how to add event monitoring in s3 ?

0

I have set up a dvc (https://dvc.org/doc/user-guide/data-management/managing-external-data) , such that (sample commands below), when i run this command dvc add --external s3://mybucket/existing-data, it copies the data in this bucket to the cache folder (s3://mybucket/cache) . this set up worked for me , but at times the data is not copied to cache folder. I want to know if i can set up any cloudwatch alarms that get triggered, if the copying of data is failing because of any permissions/access isssue in certain bucket .

also, currently , i generate access/secret keys to issue these dvc commands from my local machine, is there another way to get access to these s3 bucket, like setting up access points. i need to be able to get and create objects access.

dvc remote add s3cache s3://mybucket/cache
dvc config cache.s3 s3cache
  • Hi clouduser, if you think my answer cover your requests can I please ask you to consider to accept my answer?

已提問 1 年前檢視次數 308 次
3 個答案
1

Hi, to answer your first questions:

I want to know if i can set up any cloudwatch alarms that get triggered, if the copying of data is failing because of any permissions/access isssue in certain bucket .

To monitor S3 you could setup the following elements:

also, currently , i generate access/secret keys to issue these dvc commands from my local machine, is there another way to get access to these s3 bucket, like setting up access points

The S3 Access Point feature might be used to better refine your authorization mechanism (https://aws.amazon.com/s3/features/access-points/), however you will still be required to perform some authentication either via:

AWS
已回答 1 年前
0

You can set up alarms by sending CloudTrail logs to CloudWatch logs and setting a filter in the metrics filter with a string for permission errors.
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/monitor-cloudtrail-log-files-with-cloudwatch-logs.html

profile picture
專家
已回答 1 年前
0

To add the required CloudTrail policy to an Amazon S3 bucket Open the Amazon S3 console at https://console.aws.amazon.com/s3/.

Choose the bucket where you want CloudTrail to deliver your log files, and then choose Permissions.

Choose Edit.

Copy the S3 bucket policy to the Bucket Policy Editor window. Replace the placeholders in italics with the names of your bucket, prefix, and account number. If you specified a prefix when you created your trail, include it here. The prefix is an optional addition to the S3 object key that creates a folder-like organization in your bucket.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-event-notifications.html https://docs.aws.amazon.com/AmazonS3/latest/userguide/NotificationHowTo.html

AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南