0

I have a Windows EC2 instance in place. I cannot delete it every day since we have multiple tools installed like accessing Postgress RDS via Dbeaver. Now, we have an activity of deleting a few S3 folders. So using the Mobaxterm tool, I can delete it via AWS CLI commands.

However, I am unable to schedule this script which runs once daily in the morning. I explored a few posts which are not relevant to my problem. There, the user is trying to launch > run script > delete instance which I don't want to do.

What can be done in my case?

baduker
  • 15,071
  • 9
  • 26
  • 44
whatsinthename
  • 1,481
  • 13
  • 45

1 Answers1

1

At least two options come to mind:

  1. Use Windows task scheduler to create a task that will run your script daily directly on the instance
  2. Use AWS Systems Manager State Manager to run a custom document that will execute your script remotely on a daily basis

I would recommend the second option because you would be able to reuse it for other instances if needed.

Paolo
  • 13,742
  • 6
  • 28
  • 51