Tag amazon-ec2

[Solved] Can I create custom EC2 hardware? [closed]

This is not possible. AWS has racks of ‘host’ computers, each with a particular specification in terms of CPU type, number of CPUs, RAM, directly-attached disks (sometimes), attached GPUs (sometimes), network connectivity, etc. Each of these hosts is then divided…

[Solved] Amazon summer time reliability

Copied from AWS user guide: Amazon Linux instances are set to the UTC (Coordinated Universal Time) time zone by default Furthermore: Network Time Protocol (NTP) is configured by default on Amazon Linux instances; however, an instance needs access to the…

[Solved] Count Running and Stopped Ec2 Instances with AWS Lambda

Here’s some code that retrieves a list of instances and count the number of stopped and running instances: import boto3 def lambda_handler(event, context): ec2_resource = boto3.resource(‘ec2’) instances = [instance.state[“Name”] for instance in ec2_resource.instances.all()] print(‘Running: ‘, instances.count(‘running’)) print(‘Stopped: ‘, instances.count(‘stopped’)) The…