DocsAWS 101BlogServices

EC2

Instances, VPCs, subnets, security groups, EBS volumes, snapshots, launch templates, key pairs, elastic IPs.

Query (Action parameter) multi-tenant 71 operations

Quick start

import boto3
ec2 = boto3.client("ec2", endpoint_url="http://localhost:4566",
                   region_name="us-east-1",
                   aws_access_key_id="test", aws_secret_access_key="test")
vpc = ec2.create_vpc(CidrBlock="10.0.0.0/16")["Vpc"]
print(ec2.describe_vpcs()["Vpcs"])

Supported operations

71 operations exposed by this service as of MiniStack 1.3.14. Extracted directly from the handler dispatch in the source module.

... and 67 more AcceptVpcPeeringConnection AllocateAddress AssociateAddress AssociateDhcpOptions AssociateRouteTable AttachInternetGateway AttachNetworkInterface AttachVolume AttachVpnGateway AuthorizeSecurityGroupEgress AuthorizeSecurityGroupIngress CopySnapshot CreateCustomerGateway CreateDefaultVpc CreateDhcpOptions CreateEgressOnlyInternetGateway CreateFlowLogs CreateInternetGateway CreateKeyPair CreateLaunchTemplate CreateLaunchTemplateVersion CreateManagedPrefixList CreateNatGateway CreateNetworkAcl CreateNetworkAclEntry CreateNetworkInterface CreateRoute CreateRouteTable CreateSecurityGroup CreateSnapshot CreateSubnet CreateTags CreateVolume CreateVpc CreateVpcEndpoint CreateVpcPeeringConnection CreateVpnGateway DeleteCustomerGateway DeleteDhcpOptions DeleteEgressOnlyInternetGateway DeleteFlowLogs DeleteInternetGateway DeleteKeyPair DeleteLaunchTemplate DeleteManagedPrefixList DeleteNatGateway DeleteNetworkAcl DeleteNetworkAclEntry DeleteNetworkInterface DeleteRoute DeleteRouteTable DeleteSecurityGroup DeleteSnapshot DeleteSubnet DeleteTags DeleteVolume DeleteVpc DeleteVpcEndpoints DeleteVpcPeeringConnection DeleteVpnGateway DescribeAddresses DescribeAddressesAttribute DescribeAvailabilityZones DescribeCapacityReservations DescribeCustomerGateways DescribeDhcpOptions DescribeEgressOnlyInternetGateways DescribeFlowLogs DescribeImages DescribeInstanceAttribute

CloudFormation

The CloudFormation engine provisions these resource types via this service:

AWS::EC2::VPC AWS::EC2::Subnet AWS::EC2::SecurityGroup AWS::EC2::InternetGateway AWS::EC2::VPCGatewayAttachment AWS::EC2::RouteTable AWS::EC2::Route AWS::EC2::SubnetRouteTableAssociation AWS::EC2::LaunchTemplate AWS::EC2::Instance

See CloudFormation engine for intrinsic support and lifecycle details.

Known limitations

  • No real VMs are started — RunInstances returns instance metadata only.
  • No networking — security group rules are stored but never filter traffic.
  • IAM permission evaluation on ec2:* is not performed.

Source

  • ministack/services/ec2.py:4106-4166

Read the source to verify the ops list above — dispatch tables and handler functions are the ground truth.