Gerson
Gerson

Reputation: 11

How can I run aws cli commands in scheduled?

I'm trying to run AWS CLI commands every week for a backup. Basically, the commands that I want to run are:

aws configure set aws_access_key_id "access_key" --profile user2 && aws configure set aws_secret_access_key "secret_key" --profile user2 && aws configure set region "us-east-2" --profile user2 && aws configure set output "text" --profile user2

aws s3 ls --endpoint-url=https://s3.wasabisys.com

aws s3 sync <SOURCE-BUCKET> <DESTINATION-BUCKET> --endpoint-url=https://s3.wasabisys.com

It works when I run these commands in AWS CloudShell, but I want to run them automatically every week. How can I achieve that?"

Upvotes: 0

Views: 593

Answers (0)

Related Questions