Skip to main content

EC2

EC2 actions allow you to perform targeted operations against EC2 resources.

Integration Actions

You can add these actions in the Spot Connect workflow builder as part of your workflow:

EC2 Filter Reserved Instances

This node returns the list of reserved instances using filters of days to expiration and minimum purchase price.

Input

ParameterDescriptionRequired
Target Account AliasCan select multiple AWS account to filter the savings plansTrue
Maximum number of days to expirationFilter Reserved Instances by the number of days to expirationTrue
Minimum dollar amount for Reserved InstanceMinimum purchase price for the Reserved instanceTrue

Output

ParameterTypeDescription
reserved_instancesObjectList of object w.r.t Alias which specifies the Reserved_Instance_Id, Offering_Type, Fixed_Price and Expiry_In_Days.
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

  • Target Account Aliases: Select the target accounts.
  • Maximum number of days to expiration: Add the maximum number of days to expiration.
  • Minimum dollar amount for Reserved Instance: Add the minimum dollar amount for reserved instances.

Input

ec2-1

Output

ec2-2

EC2 Filter Savings Plans

This node returns the list of savings plans using filters of days to expiration and payment option.

Input

ParameterDescriptionRequired
Target Account AliasCan select multiple AWS account to filter the savings plansTrue
Maximum number of days to expirationFilter Reserved Instances by the number of days to expirationTrue
Payment OptionAllowed payment options: All Upfront, Partial Upfront, No UpfrontTrue

Output

ParameterTypeDescription
savings_plansObjectList of object w.r.t Alias which specifies the Savings_Plan_ARN, Description, Payment_Option and Expiry_In_Days.
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

  • Target Account Aliases: Select the target accounts.
  • Maximum number of days to expiration: Add the maximum number of days to expiration.
  • Payment options: Select Payment options.

Input

ec2-3

Output

ec2-4

EC2 Filter Snapshots

List all EC2 snapshots created before a given number of days.

Input

ParameterDescriptionRequired
Target Account AliasSelect AWS account to filter snapshots.True
Number of daysList EC2 snapshots created before provided number of days from the current timestamp.True
Region NameSpecify region name to filter the snapshots.False

Output

ParameterTypeDescription
snapshot_idsStringListList of all the snapshot ids
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

Input

ec2-5

Output

ec2-6

EC2 Get Sizing Recommendations

This node gets sizing recommendations for EC2 instances.

Input

ParameterDescriptionRequired
Target Account AliasTarget account alias to be used to fetch sizing recommendationsTrue
Region NameAWS Region Name for filtering Trusted Advisor checksFalse

Output

ParameterTypeDescription
recommendationsMapListA list of sizing recommendations
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

Input

ec2-7

Output

ec2-8

EC2 Revoke Security Group Ingress

This node filters the security groups using the inputs and removes the matching inbound (ingress) rule from a security group.

Input

ParameterDescriptionRequired
Target Account AliasTarget account alias to be used to fetch sizing recommendationsTrue
IP Permission ProtocolThe IP protocol for an inbound security group rule (tcp | udp | icmp, a protocol number, or -1 for all protocols)False
IP Permission CIDRAn IPv4 CIDR block for an inbound security group rule, example: 0.0.0.0/0False
IP Permission IPV6 CIDRAn IPv6 CIDR block for an inbound security group ruleFalse
IP Permission from PortFor an inbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type numberFalse
IP Permission to PortFor an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP codeFalse

Output

ParameterTypeDescription
execution_statusStringStatus of run (ie: S_OK / E_FAIL)
group_idsStringListA list of group ids

Action Example

Input

ec2-9

Output

ec2-10

EC2 Resize Instances

This node modifies EC2 instances based on the input.

Input

ParameterDescriptionRequired
Target Account AliasTarget account alias to be used to resize instancesTrue
Update ConfigA maplist of update config. (Make sure instance is stopped) Example update config in the list: {'recommended_instance_type': 't3.nano', instance_id': 'i-abcd1234'}True
DryRunIndicate whether this is a dry runFalse

Output

ParameterTypeDescription
instancesMapListA list of updated EC2 instances
execution_statusStringStatus of run (ie: S_OK / E_FAIL)

Action Example

Input

ec2-11

Output

ec2-12