Skip to content

Instantly share code, notes, and snippets.

View amar-m-cloud's full-sized avatar
🏠
Working from home

Amar Tech in Cloud amar-m-cloud

🏠
Working from home
View GitHub Profile
import logging
import os
import boto3
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def turn_off_instances(instance_ids):
ec2 = boto3.client('ec2', region_name=region)
ec2.stop_instances(InstanceIds=instance_ids)