简体   繁体   中英

Is there a way to delete aws EC2 intance windows server folders and log files from outside using aws service api

We have an application running in ec2 windows server. The application returns logs that consumes the storage and make it full. we need to delete the logs from outside of the ec2 instance either using an aws api or aws sdk. Please let me know if there is an option. Thanks.

To delete files on the EBS volume attached to your Windows server, you would have to run commands from inside the Windows server. There are no APIs available to directly modify the data stored on the EBS volume.

If you have the AWS Systems Manager agent installed on the Windows server , then you can use the AWS Systems Manager service to run commands on the server to delete those log files. However, I'm not sure that's any better than just configuring a scheduled job on the server itself to periodically delete those log files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM