Enable/Disable Termination Protection in EC2 For 100 Instances / Blogs / Perficient

Enable/Disable Termination Protection in EC2 For 100 Instances / Blogs / Perficient

Manually enable/disable for 100 Instances is a difficult task. To overcome this task we have some automated processes. It’s possible to automate the process in one short using Python SDK. List of Ec2 instances: Python Code: import boto3 def disable_termination_protection(instance_id): ec2 = boto3.client(‘ec2’) response = ec2.modify_instance_attribute( InstanceId=instance_id, DisableApiTermination={ ‘Value’: False } ) print(f”Termination protection disabled … Read more

Social media & sharing icons powered by UltimatelySocial
error

Enjoy Our Website? Please share :) Thank you!