Amazon EC2 provides scalable computing capacity in the cloud. It allows users to launch virtual servers (instances) with various configurations, such as CPU, memory, storage, and networking, and provides full control over them.
import boto3
# Create an EC2 client
ec2 = boto3.client('ec2')
# Launch an EC2 instance
response = ec2.run_instances(
ImageId='ami-12345678',
InstanceType='t2.micro',
MinCount=1,
MaxCount=1
)