Amazon AWS

Integration with LogicHub

Connecting with Amazon AWS

To connect to Amazon AWS 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.
  • AWS Access Key: To access AWS API, provide a valid Access Key.
  • AWS Secret Key: To access AWS API, provide a valid Secret Key.
  • AWS Region: Provide a valid Region for accessing AWS API. For example, us-west-1.

Actions with Amazon AWS

IP Address Ranges

Action will get the range of IP Addresses.

Inputs to this Action

  • Connection: Choose a connection that you have created.

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • result: IP Address ranges
{
   "syncToken": "1613086452",
   "createDate": "2021-02-11-23-34-12",
   "prefixes": [
      {
         "ip_prefix": "3.5.140.0/22",
         "region": "ap-northeast-2",
         "service": "AMAZON",
         "network_border_group": "ap-northeast-2"
      },
      {
         "ip_prefix": "15.230.56.104/31",
         "region": "us-east-1",
         "service": "AMAZON",
         "network_border_group": "us-east-1"
      },
      {
         "ip_prefix": "35.180.0.0/16",
         "region": "eu-west-3",
         "service": "AMAZON",
         "network_border_group": "eu-west-3"
      },
      {
         "ip_prefix": "52.93.153.170/32",
         "region": "eu-west-2",
         "service": "AMAZON",
         "network_border_group": "eu-west-2"
      },

User Details

Action will get the user details of provided username.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • Username: Column name from parent table that contains the username.
  • Display Attached Items (Optional): Select option True/False to display attached items to this IAM user (default is False).

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • result: User details.
{
  "Arn": "arn:aws:iam::273248288272:user/indrajeet",
  "CreateDate": "2020-02-20 11:11:58+00:00",
  "PasswordLastUsed": "2021-02-19 14:35:01+00:00",
  "Path": "/",
  "UserId": "AIDAT7HW57YIPXU2NSZPB",
  "UserName": "indrajeet",
  "access_keys": [
    {
      "AccessKeyId": "AKIAT7HW57YIKOZKHAME",
      "CreateDate": "2020-02-20 11:12:00+00:00",
      "Status": "Active",
      "UserName": "indrajeet"
    },
    {
      "AccessKeyId": "AKIAT7HW57YILHERPDXV",
      "CreateDate": "2020-06-01 13:39:47+00:00",
      "Status": "Active",
      "UserName": "indrajeet"
    }
  ],
  "attached_policies": [],
  "git_creds": [],
  "groups": [
    {
      "Arn": "arn:aws:iam::273248288272:group/administrator",
      "CreateDate": "2020-01-15 00:12:01+00:00",
      "GroupId": "AGPAT7HW57YIGCWTILAJL",
      "GroupName": "administrator",
      "Path": "/"
    }
  ],
  "login_profile": {
    "CreateDate": "2020-02-20 11:12:00+00:00",
    "PasswordResetRequired": false,
    "UserName": "indrajeet"
  },
  "mfa_devices": [
    {
      "EnableDate": "2020-12-14 09:54:39+00:00",
      "SerialNumber": "arn:aws:iam::273248288272:mfa/indrajeet",
      "UserName": "indrajeet"
    }
  ],
  "signing_certs": [],
  "ssh_pub_keys": [],
  "user_policies": []
}

Allow/Deny IP to Network ACL

Action will allow/deny IP to Network ACL.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • Network ACL ID COLUMN NAME: Column name that contains network ACL ID.
  • Rule No. COLUMN NAME: Column name that contains rule number.
  • Cidr Block COLUMN NAME: Column name that contains CIDR Block.
  • From Port COLUMN NAME: Column name that contains from the port.
  • To Port COLUMN NAME: Column name that contains to port.
  • Rule Action: Action to determine to allow/deny IP to Network ACL.
  • Protocol COLUMN NAME: Column name that contains protocol information.
  • ICMP protocol code COLUMN NAME(Optional): Column name that contains protocol code information, Required in case of ICMP.
  • ICMP protocol type COLUMN NAME(Optional): Column name that contains protocol type information, Required in case of ICMP.

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • result: Rule added to AWS Network ACL.

Delete IAM User

Action will delete provided users identified by usernames along with their attached items. See https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUser.html.

Inputs to this Action

  • Connection: Choose a connection that you have created.
  • Username: Column name from parent table that contains the username.

Output of Action
JSON containing following items:

  • has_error: True/False
  • error: message/null
  • msg: User XYZ has been deleted from IAM (if successful)
{
   "error": "Could not delete user indrajeet\nClientError('An error occurred (AccessDenied) when calling the DeleteLoginProfile operation: User: arn:aws:iam::827505017847:user/ec2-read-only is not authorized to perform: iam:DeleteLoginProfile on resource: user indrajeet')",
   "has_error": true
}

Did this page help you?