- Get ram details
lshw -class memory
dmidecode -t memory
- Check ram latancy info
dnf install decode-dimms
decode-dimms
lshw -class memory
dmidecode -t memory
dnf install decode-dimms
decode-dimms
import boto3
region = 'ap-south-1'
instances = ['i-0e4e6863cd3da57b5']
ec2 = boto3.client('ec2', region_name=region)
def lambda_handler(event, context):
ec2.stop_instances(InstanceIds=instances)
print('stopped your instances: ' + str(instances))