AWS SDN connector using certificates

FortiOS automatically updates dynamic addresses for AWS using an AWS SDN connector, including mapping attributes from AWS instances to dynamic address groups in FortiOS.

Configuring the SDN connector using the GUI, then checking the configuration using the CLI is recommended.

Note

This topic describes one of multiple configuration methods available with this SDN connector type. See the More Links section on the right sidebar for other methods.

To configure an AWS SDN connector using the GUI:
  1. Configure the AWS SDN connector:

    1. Go to Security Fabric > External Connectors.

    2. Click Create New, and select Amazon Web Services (AWS).

    3. In the Access key ID field, enter the key created in the AWS management portal.

    4. In the Secret access key field, enter the secret access key accompanying the above access key.

    5. In the Region name field, enter the region name. Refer to AWS Regions and Endpoints for the desired region name.

    6. In the VPC ID field, enter the VPC ID within the specified region you desire to cover with the SDN connector.

    7. Click OK.

  2. Check the configuration using the CLI:

    config system sdn-connector

    edit "<connector-name>"

    show

    The output resembles the following:

    config system sdn-connector

    edit "<connector-name>"

    set access-key "<example-access-key>"

    set secret-key ENC <example-secret-key>

    set region "us-west-2"

    set vpc-id "vpc-e1e4b587"

    set update-interval 1

    next

    end

    If you see that the SDN connector is not enabled in Security Fabric > External Connectors in the GUI, run the following commands to enable the SDN connector:

    diagnose deb application awsd -1

    diagnose debug enable

    The output may display an error like the following:

    FGT # awsd sdn connector AWS_SDN prepare to update

    awsd sdn connector AWS_SDN start updating

    aws curl response err, 403

    <?xml version="1.0" encoding="UTF-8"?>

    <Response><Errors><Error><Code>UnauthorizedOperation</Code><Message>You are not authorized to perform this operation.</Message></Error></Errors><RequestID>8403cc11-b185-41da-ad6d-23bb4db7d00a</RequestID></Response>

    awsd curl failed 403

    awsd sdn connector AWS_SDN failed to get instance list

    aws curl response err, 403

    {"Message":"User: arn:aws:iam::956224459807:user/jcarcavallo is not authorized to perform: eks:ListClusters on resource: arn:aws:eks:us-east-1:956224459807:cluster/*"}

    awsd sdn connector AWS_SDN get EKS cluster list failed

    awsd sdn connector AWS_SDN list EKS cluster failed

    awsd sdn connector AWS_SDN start updating IP addresses

    awsd sdn connector AWS_SDN finish updating IP addresses

    awsd reap child pid: 569

    In this case, you must configure power user access for the current administrator in the AWS management console:

    After configuring power user access, run the following commands:

    diagnose deb application awsd -1

    diagnose debug enable

    The output should display without error, as follows:

    FGT # AWSD: update sdn connector AWS_SDN status to enabled

    awsd sdn connector AWS_SDN prepare to update

    awsd sdn connector AWS_SDN start updating

    awsd get ec2 instance info successfully

    awsd sdn connector AWS_SDN start updating IP addresses

    awsd sdn connector AWS_SDN finish updating IP addresses

    awsd reap child pid: 893

    The AWS connector is now enabled.

  3. Create a dynamic firewall address for the configured AWS SDN connector:

    1. Go to Policy & Objects > Addresses.

    2. Click Create New, then select Address.

    3. From the Type dropdown list, select Dynamic.

    4. From the Sub Type dropdown list, select Fabric Connector Address.

    5. In the Filter field, add the desired filters. The following filters are supported:

      Description

      Key

      Example value

      Architecture architecture

      x86

      Autoscaling group AutoScaleGroup

      10703c-4f731e90-fortigate-payg-auto-scaling-group

      AZ placement.availabilityzone

      us-east-1a

      Group name placement.groupname

       

      Image ID imageId

      ami-123456

      Instance ID instanceId

      i-12345678

      Instance type instanceType

      t2.micro

      Key name keyName

       

      Kubernetes cluster k8s_cluster

       

      Kubernetes label and its name k8s_label.Name

       

      Kubernetes namespace k8s_namespace

       

      Kubernetes node name