How to choose directory and filename for Cloudwatch Logs export?

  Kiến thức lập trình

I can issue:

aws logs create-export-task --task-name "mytask-2024-07-08" --log-group-name "my-log-group" --from 1720411200000 --to 1720497600000 --destination "my-bucket" --destination-prefix "path/to/dir"

I get back the following JSON

{
  "taskId": "551b3b18-3999-4e8d-9235-2468ae3612345"
}

But AWS insists on putting everything here:

aws s3 ls s3://my-bucket/path/to/dir/551b3b18-3999-4e8d-9235-2468ae3612345/subdir/
2024-07-10 20:05:51       1155 000000.gz

I don’t want to put it in the hashed directory with some weird filename. I want to control that.

I understand it’s probably done that way to prevent filename collisions but its really annoying.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT