2

I am trying to backup Apache 2.4.27 logs on Amazon Linux 2016.03. I am trying to do so without writing a shell script, and I do not want to configure AWS access key and secret key on my Linux machine.

1
  1. Use EC2 IAM Role that gives your EC2 instance the required credentials without having to manage Access/Secret keys.

  2. If you want to get away without a shell script you can feed the logs to CloudWatch Logs using awslogs.

However uploading your Apache logs to S3 is a simple command like aws s3 cp /var/log/http/... s3://some-bucket/... - that can be called e.g. from your weekly/daily logrotate config or from cron. That can hardly be called a "shell scripting" ;)

Hope that helps :)

  • 1
    My default here would be an IAM role as you said, plus the cloudwatch logs agent. Cloudwatch logs is typically better than putting logs into an S3 bucket. – Tim Oct 12 '18 at 7:56
  • Went ahead with s3 command line. Working smoothly. – thinktwice Oct 13 '18 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.