Amazon EC2 (Assumed Role)

Integration with LogicHub

Connecting with Amazon EC2

To connect to Amazon EC2 following details are required:

  • Label: Connection name.
  • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
  • Region: Valid AWS Region Name. (To get a list of available regions, refer to this link).
  • Access Key: AWS Account Access Key.
  • Secret Key: AWS Account Secret Key.

Actions with Amazon EC2

Launch an Instance

Launch an instance of Amazon EC2.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • External ID: Jinja templated External ID which is linked with an account in which EC2 image is to be launched
  • EC2 Image Id Column name: Column name from parent table holding the Image ID.
  • EC2 Instance Type Column name: Column name from parent table holding the Instance Type.
  • EC2 Key Pair Column name: Column name from parent table holding the Key Pair name.

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • result: Instance Details

Start an Instance

Start an instance of Amazon EC2 that was previously stopped.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • External ID: Jinja templated External ID which is linked with an account in which EC2 image is to be started
  • EC2 Instance ID Column name: Column name from parent table holding the Instance ID.

Output of Action
json containing following items:

  • has_error: True/False
  • error: message/null

Stop an Instance

Stop an instance of Amazon EC2.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • External ID: Jinja templated External ID which is linked with an account in which EC2 image is to be stopped
  • EC2 Instance ID Column name: Column name from parent table holding the Instance ID.

Output of Action
Array of JSON in individual rows for each external ID with each containing the following items:

  • has_error: True/False
  • error: message/null

Describe Instances

Action will describe one or more of your instances.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • Filters in JSON COLUMN NAME: Column name that contains filters in JSON format. Example:
    [{"Name": "instance-type","Values": ["t2.micro", "t3.micro"]}].

Output of Action
Array of JSON in individual rows for each external ID with each containing following items:

  • has_error: True/False
  • error: message/null
  • result: Instances details

Describe Security Groups

Action will describe one or more of your security groups.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • Filters in JSON COLUMN NAME: Column name that contains filters in JSON format. Example:
    [{"Name": "instance-type","Values": ["t2.micro", "t3.micro"]}].

Output of Action
Array of JSON in individual rows for each external ID with each containing following items:

  • has_error: True/False
  • error: message/null
  • result: Security groups details.

Add IP to Security Group

Action will add IP to a security group.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • External ID: Jinja templated External ID which is linked with account in which ID is to be added to Security Group
  • Security group name or id COLUMN NAME: Column name that contains security group name or ID.
  • IP Address COLUMN NAME: Column name that contains IP address.
  • IP Protocol COLUMN NAME: Column name that contains IP protocol.
  • From Port COLUMN NAME: Column name that contains from the port.
  • To Port COLUMN NAME: Column name that contains to port.

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • result: Success/Failure Message

Remove IP from Security Group

Action will add IP to a security group.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • External ID: Jinja templated External ID which is linked with account from which IP is to be removed
  • Security group name or id COLUMN NAME: Column name that contains security group name or ID.
  • IP Address COLUMN NAME: Column name that contains IP address.
  • IP Protocol COLUMN NAME: Column name that contains IP protocol.
  • From Port COLUMN NAME: Column name that contains from the port.
  • To Port COLUMN NAME: Column name that contains to port.

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • result: Success/Failure Message

Did this page help you?