Amazon EC2 provides resizable virtual servers in AWS. The EC2 API also covers the VPC networking around them (subnets, route tables, NAT and internet gateways, security groups, network interfaces, and Elastic IP addresses) and the EBS volumes and snapshots that back them.
With the Amazon EC2 block, you can:
- Inventory and control instances: List instances with their state, type, IPs, and tags, read status checks and scheduled maintenance events, and start, stop, reboot, or terminate instances
- Manage Elastic IPs: List Elastic IP addresses and what they are attached to, allocate new addresses, associate them with an instance or network interface, disassociate them, and release them
- Inspect VPC networking: Read VPCs, subnets, route tables with their routes and associations, NAT gateways with their public IPs, internet gateways, network ACLs, VPC endpoints, VPC peering connections, security groups with their inbound and outbound rules, and network interfaces
- Control security group ingress: Add an inbound rule, or revoke rules by rule ID or by protocol, ports, and source
- Work with EBS: List volumes and snapshots, create a snapshot of a volume, and delete volumes and snapshots
- Tag resources: Add, overwrite, or remove tags on any EC2 resource ID
- Explore the account: List AMIs, key pairs, Regions, and Availability Zones
Credentials and permissions
The block authenticates with an AWS access key ID and secret access key and runs in the region you set. Grant the IAM principal only the EC2 actions the operations you use require. Each operation maps to the IAM action of the same name, for example ec2:DescribeAddresses, ec2:DescribeNatGateways, and ec2:DescribeRouteTables for a read-only egress audit, or ec2:StopInstances and ec2:StartInstances for scheduling.
List operations accept EC2 filters such as [{"Name": "vpc-id", "Values": ["vpc-0abc123"]}]. Without IDs they return up to 100 results per page, with a nextToken for the next page.
In Sim, the Amazon EC2 block lets your agents map which public IPs your subnets egress through, find idle Elastic IPs and unattached volumes, audit and close open security group rules, back up volumes and prune old snapshots on a schedule, and stop non-production instances outside working hours.
Use the block
Integrate Amazon EC2 into workflows. Describe and control instances, manage Elastic IP addresses, inspect VPCs, subnets, route tables, NAT and internet gateways, security groups, and network interfaces, add and revoke security group ingress rules, inspect network ACLs, VPC endpoints, and peering connections, work with EBS volumes and snapshots, list AMIs and key pairs, and tag resources. Requires an AWS access key with the matching ec2:* IAM permissions.
Actions
EC2 Describe Instances
List EC2 instances with their state, type, networking, and tags
EC2 Describe Instance Status
Get status checks and scheduled events for EC2 instances
EC2 Start Instances
Start one or more stopped EC2 instances
EC2 Stop Instances
Stop one or more running EC2 instances
EC2 Reboot Instances
Request a reboot of one or more EC2 instances
EC2 Terminate Instances
Permanently terminate one or more EC2 instances
EC2 Describe Addresses
List Elastic IP addresses and what they are associated with
EC2 Allocate Address
Allocate a new Elastic IP address for use in a VPC
EC2 Associate Address
Associate an Elastic IP address with an instance or network interface
EC2 Disassociate Address
Disassociate an Elastic IP address from its instance or network interface
EC2 Release Address
Release an Elastic IP address back to AWS
EC2 Describe NAT Gateways
List NAT gateways with their state, subnet, and IP addresses
EC2 Describe Route Tables
List VPC route tables with their routes and subnet associations
EC2 Describe VPCs
List VPCs with their CIDR blocks and state
EC2 Describe Subnets
List subnets with their CIDR, Availability Zone, and free IP count
EC2 Describe Security Groups
List security groups with their inbound and outbound rules
EC2 Describe Internet Gateways
List internet gateways and the VPCs they are attached to
EC2 Describe Network Interfaces
List elastic network interfaces with their IPs, attachment, and security groups
EC2 Describe Volumes
List EBS volumes with their size, type, state, and attachments
EC2 Describe Snapshots
List EBS snapshots owned by the account (or by the owners you specify)
EC2 Create Snapshot
Create a point-in-time snapshot of an EBS volume
EC2 Create Tags
Add or overwrite tags on one or more EC2 resources
EC2 Delete Tags
Remove tags from one or more EC2 resources
EC2 Describe Regions
List AWS Regions available to the account
EC2 Describe Availability Zones
List Availability Zones, Local Zones, and Wavelength Zones in the region
EC2 Authorize Security Group Ingress
Add an inbound rule to a security group
EC2 Revoke Security Group Ingress
Remove inbound rules from a security group by rule ID or by matching protocol, ports, and source
EC2 Describe Network ACLs
List network ACLs with their inbound and outbound rules and subnet associations
EC2 Describe VPC Endpoints
List VPC endpoints with their service, type, state, and network placement
EC2 Describe VPC Peering Connections
List VPC peering connections with their status and both VPCs
EC2 Delete Volume
Permanently delete an EBS volume that is not attached to an instance
EC2 Delete Snapshot
Permanently delete an EBS snapshot
EC2 Describe Images
List AMIs owned by the account (or by the owners you specify)
EC2 Describe Key Pairs
List EC2 key pairs with their type, fingerprint, and creation time