AIP AWS Manual Integration: Leverage Existing CloudTrail Resources


App Infrastructure Protection (AIP) integrates with Amazon Web Services (AWS), including CloudTrail. If you currently use AWS CloudTrail, then you can leverage your existing resources in your AIP Cloud Security Platform integration.


To enable KMS encryption using your own key, see Enabling Encryption for your CloudTrail Log Files.


  • Administrator access to your AWS account
  • Access to the AIP console with a configured AIP account
  • A text editing program
  • Existing AWS CloudTrail
  • Existing AWS S3 bucket
  • Existing SNS topic


Use side-by-side browser windows – one for AWS and one for AIP – to complete these instructions.

1. Create AIP-Specific SQS Queue and Subscribe to SNS Topic

The AIP AWS integration requires access to a AIP-specific SQS Queue. To ensure you receive CloudTrail logs (SNS notifications), your AIP-specific SQS Queue must subscribe to your existing CloudTrail SNS topic.


The SQS Queue must be created and reside in the same AWS Region as the S3 bucket where CloudTrail logs are stored.

  1. In the AWS Console, go to Services > Application Integration > Simple Queue Service. The SQS page displays.


  2. Click the Create New Queue button. The Create New Queue page displays.


  3. In the Queue Name field, type a name for the standard queue. AIP recommends you match at least part of the SQS Queue name to your CloudTrail S3 bucket name, so the two are easy to correlate in the future.
  4. Click the Quick-Create Queue button. The SQS Queue page displays.


    In the SQS Queue table, the new queue is selected and the Details tab displays.


  5. Open a text editing program and type “SQS Queue Name.”
  6. On the same line, copy the Name field and paste it in the text editing program.
  7. On the next line, type "SQS Queue ARN."
  8. On the same line, copy the ARN field and paste it in the text editing program.


    The SQS ARN is part of the information needed for a AIP-specific IAM policy.

  9. In the AWS Console, confirm the new SQS queue is selected.
  10. Click the Queue Actions drop-down menu and select Subscribe Queue to SNS Topic.


    The Subscribe to a Topic dialog opens.


  11. From the Choose a Topic drop-down menu, select the SNS topic associated with CloudTrail. The Topic ARN field automatically populates with the SNS ARN.
  12. Click the Subscribe button. The AIP-specific SQS queue now subscribes to all messages that are part of the SNS topic.
2. Begin Creation of AIP AWS Profile

The AIP AWS profile includes a unique account ID and external ID. These IDs link the AIP AWS profile to the AWS integration.


You will complete the AIP AWS Profile after completing the creation of the AIP-specific AWS IAM role.

  1. Log into AIP.
  2. In the left navigation pane, click Settings. The Settings page displays
  3. Click Integrations. The Integrations page displays.
  4. In the AWS Integrations section, click the + Add AWS Integration button. The + Add AWS Integration dialog opens.



    Do not close this dialog until the AWS integration is complete. The External ID is uniquely generated each time you add an AWS profile and must match the value entered during the AWS integration. If you click the close button, then a confirmation message displays in which you must acknowledge the close.


3. Create AIP-Specific AWS IAM Role

The AIP AWS profile authenticates in AWS using the IAM role created in this procedure.

  1. In the AWS Console, go to Services > Security, Identity, & Compliance > IAM. The Welcome to Identity and Access Management page displays.


  2. In the left navigation pane, click Roles. The Roles page displays.


  3. Click the Create role button. The Create role page displays.


  4. In the Trusted entity type section, click AWS Account.
  5. Select the This account (ID number) radio button, or select Another AWS account, then copy and paste the ID number of the account you want to add.
  6. In the Options section, select the Require external ID check box. Additional information displays.


  7. In the External ID field, copy and paste the External ID value from the AIP + Add AWS Account dialog.
  8. Click the Next: Permissions button. The Attach permissions policies page displays. Do not change any information on this page.


  9. Click the Next: Review button. The Review page displays.


  10. In the Role name field, type a role name. This is the name of the IAM role the AIP AWS Account will use to authenticate in AWS.
  11. Click the Create role button. The new AIP-specific IAM role creates. The Roles page displays.


  12. In the Search field, type the name of the IAM for the role you created in step 11, and press ENTER.
  13. Select the IAM role. The Summary page displays.


  14. Open the text editing program and type “IAM Role ARN.”
  15. On the same line, copy and paste the Role ARN.


    The Role ARN will complete the AIP AWS Profile.

4. Create Custom IAM Policy

The AIP-specific AWS IAM role requires specific permissions to access data for the AIP AWS integration. In this procedure, you create a custom permission policy that grants the AIP-specific AWS IAM role:

  • The read-only permissions required for AIP EC2 synchronization.
  • Permissions to pull messages from the AIP-specific SQS Queue and read the contents of the CloudTrail S3 bucket.
  1. In the AWS Console, on the IAM Roles main page, select the IAM role you created in the “Create AIP-Specific AWS IAM Role” section.
  2. On the Permissions tab, click the + Add inline policy link.


    The Create Policy page displays.


  3. Select the JSON tab.
  4. Copy and paste the following information:
        "Version": "2012-10-17",
        "Statement": [
                "Action": [
                "Resource": "*",
                "Effect": "Allow",
                "Sid": "ThreatStackPermissions"
                "Action": [
                "Resource": [
                "Effect": "Allow"
                "Action": [
                "Resource": [
                "Effect": "Allow"
  5. In the “arn-of-SQS-queue-goes-here” line, replace the text with the SQS Queue ARN copied into the text editing program.
  6. In the “arn:aws:s3:::bucketname/*” line, replace "bucketname" with the name of CloudTrail's S3 bucket name.


    Do not remove the /* from the text. This is used as a wildcard.

  7. Click the Review policy button. The Review Policy page displays.
  8. In the Name field, type a name for the policy. AIP recommends using the same naming convention used throughout this process.
  9. Click the Create Policy button. The policy applies to the AIP-specific AWS IAM role. The Summary page displays.
5. Integrate with AIP Cloud Security Platform (CSP)Ⓡ

Completing the AIP AWS Profile allows AIP to authenticate in AWS using the AIP-specific AWS IAM role.

  1. Go to the AIP + Add AWS Integration dialog from which you copied the account ID and external ID.


  2. In the Role ARN field, copy and paste the Role ARN value from the AWS Outputs section.
  3. In the Description field, type a description of the AIP AWS role. Type a description that identifies how the bucket relates to the AWS account, such as "production."
  4. In the EC2 Correlation section, from the Select Regions drop-down menu, select the region(s) in which your organization has an EC2 presence.


  5. Select the CloudTrail Integration check box. The CloudTrail fields become available.
  6. In the SQS Name (Source) field, type the SQS Queue value.
  7. In the S3 Bucket field, type the S3 Bucket value.
  8. From the Select Region drop-down menu, select the region(s) where the S3 bucket storing CloudTrail events resides.


    Selecting a region that does not match the S3 bucket region causes the authentication of AIP in AWS using the IAM role for Cloud Trail to fail. Double-check your region selection.

  9. Verify the information entered and selected on the page is accurate.
  10. Click the Add AWS Integration button. The + Add AWS Integration dialog closes. The Integrations page displays. A “Profile Added Successfully” message displays and the new AWS profile displays in the AWS Integrations table. A clock icon displays in the EC2 Correlation Status column, indicating the profile is authenticating with AWS. This process may take several minutes.


6. Confirm Integration

In the Settings > Integrations tab > AWS Integrations table, in the row for the AWS profile, in the EC2 Correlation Status column, a green checkmark displays. That checkmark confirms that AIP successfully authenticated in AWS using the IAM role created for AWS.


Next Steps

Was this article helpful?
0 out of 0 found this helpful