> For the complete documentation index, see [llms.txt](https://docs.dropzone.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dropzone.ai/integrations/data/aws-security-lake_data.md).

# AWS Security Lake (Beta)

{% hint style="warning" %}
This integration is currently in Beta. It is not visible in the Dropzone UI until it has been explicitly enabled for your Dropzone instance. For more information about our beta integrations, engage our Customer Success team.
{% endhint %}

Dropzone AI integrates with [Amazon Security Lake](https://aws.amazon.com/security-lake/) so analysts can query the security logs and findings your organization stores there.

Dropzone assumes an IAM role in your AWS account, reads table definitions from AWS Glue, and runs read-only SQL queries with Amazon Athena. Athena bills query costs to the AWS account that runs the queries. This integration is a data source only and does not create alerts.

{% hint style="info" %}
This page covers Amazon Security Lake. The Amazon Web Services (AWS) data source and data lakes you build yourself from S3, Glue, and Athena are separate integrations.
{% endhint %}

## Integration Overview

To enable this integration you will perform the following actions:

* Choose which AWS account holds the Dropzone role
* Prepare an Athena workgroup
* Find the Dropzone ARN and External ID
* Create the IAM role and attach the permissions policy
* Give the role Lake Formation access to your Security Lake tables
* Enable the Data Source within your Dropzone tenant

## Choose Where the Dropzone Role Lives

Dropzone can read Security Lake from the account where Security Lake stores your data, or from a separate account that you set up as a Security Lake query subscriber. Your choice changes the Lake Formation steps and the Glue Database value you enter in Dropzone.

| Where the role lives                                    | Lake Formation setup                                                    | Glue Database value                                                                           |
| ------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| The account where Security Lake stores your data        | Grant the role access to the Security Lake database                     | `amazon_security_lake_glue_db_<region>`, for example `amazon_security_lake_glue_db_us_east_1` |
| A separate account, as a Security Lake query subscriber | Create a query subscriber, accept the share, and create a resource link | The name of the resource link database you create                                             |

{% hint style="info" %}
A query subscriber lets you choose which log sources Dropzone can see. See [Managing query access for Security Lake subscribers](https://docs.aws.amazon.com/security-lake/latest/userguide/subscriber-query-access.html) for how subscribers work.
{% endhint %}

## Prepare an Athena Workgroup

Dropzone runs its queries in an Athena workgroup in the account that holds the Dropzone role, in the same Region as the Glue database. See [Manage workgroups](https://docs.aws.amazon.com/athena/latest/ug/workgroups-create-update-delete.html) for how to create one.

* Create a workgroup for Dropzone, for example `dropzone`, so you can see and limit Dropzone's queries separately
* Use Athena engine version 3
* [Set a query result location](https://docs.aws.amazon.com/athena/latest/ug/query-results-specify-location.html) on the workgroup, or enter one later in the Athena Results S3 URI field
* [Set a per-query data usage limit](https://docs.aws.amazon.com/athena/latest/ug/workgroups-setting-control-limits-cloudwatch.html), for example 10 GB
  * Athena cancels any query that scans more than the limit, so a very low limit makes Dropzone queries fail

{% hint style="info" %}
If the workgroup has "Override client-side settings" turned on, Athena always uses the workgroup's query result location and ignores the Athena Results S3 URI field.
{% endhint %}

## Find the Dropzone ARN and External ID

* Navigate to your Dropzone AI tenant home page e.g. https\://*mycompany*.dropzone.app
* In the left side bar, navigate to "Platform Settings" > Integrations

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2FQKQGU2YK0KqsewZWvh0i%2Fui-integrations-dropdown.png?alt=media" alt=""><figcaption><p>Integrations Dropdown</p></figcaption></figure>

* Click "Library"

{% hint style="info" %}
If you have previously integrated this application, click "Configured"
{% endhint %}

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2Fx4O3FuRG5IqPwx5sFuHr%2Fapp_system_integrations_library.png?alt=media" alt=""><figcaption><p>Click Library</p></figcaption></figure>

* In the Search bar, search "Security Lake", then click "Configure"
* Under the "Connection" section, record the `ARN` and `EXTERNAL ID` values for the role trust policy

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2FkzJUtRwgYWY0Qty6j0bB%2Fui-security-lake-connection-info.png?alt=media" alt=""><figcaption><p>The Connection Information</p></figcaption></figure>

These are the same values the Amazon Web Services (AWS) data source shows.

## Create the IAM Role

Create the role in the account you chose above. Follow [Cross-Account Access via Console](https://docs.dropzone.ai/integrations/data/aws_data/aws-console_data.md) to create the role, with these changes:

* Use the custom trust policy from that page with the `ARN` and `EXTERNAL ID` values you recorded
* Skip the AWS data source permissions on the "Add Permissions" page
* Name the role for this integration, for example `SecurityLakeQuery`
* Attach the permissions policy below as an inline policy instead of the one on that page
* Record the role ARN for the Role ARN field in Dropzone

{% hint style="info" %}
To reach this role through a hub role, follow [Cross-Account Access via Role Chaining](https://docs.dropzone.ai/integrations/data/aws_data/aws-role-chain_data.md). The Security Lake role is the target role. It trusts the hub role ARN with no External ID condition, and the hub role's policy must allow `sts:AssumeRole` on it. Enter the hub role ARN in the Hub Role ARN field.
{% endhint %}

### Permissions Policy

You'll need the following information:

| Value              | Used In                   | Source                                                                                                                                 |
| ------------------ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `<Region>`         | `AthenaQueries` statement | The Region of the Glue database and workgroup, for example `us-east-1`                                                                 |
| `<AWS Account ID>` | `AthenaQueries` statement | The account that holds the Dropzone role                                                                                               |
| `<Workgroup>`      | `AthenaQueries` statement | The workgroup you prepared for Dropzone                                                                                                |
| `<Results bucket>` | S3 statements             | The bucket in the workgroup's query result location                                                                                    |
| `<Results prefix>` | S3 statements             | The folder in the query result location, ending in `/`, for example `dropzone/`. Leave it empty if results go to the top of the bucket |

Paste the following policy, replacing each value:

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AthenaQueries",
            "Effect": "Allow",
            "Action": [
                "athena:StartQueryExecution",
                "athena:GetQueryExecution",
                "athena:GetQueryResults",
                "athena:StopQueryExecution",
                "athena:GetWorkGroup"
            ],
            "Resource": "arn:aws:athena:<Region>:<AWS Account ID>:workgroup/<Workgroup>"
        },
        {
            "Sid": "GlueCatalogRead",
            "Effect": "Allow",
            "Action": [
                "glue:GetDatabase",
                "glue:GetTables",
                "glue:GetTable",
                "glue:GetPartitions"
            ],
            "Resource": "*"
        },
        {
            "Sid": "LakeFormationDataAccess",
            "Effect": "Allow",
            "Action": "lakeformation:GetDataAccess",
            "Resource": "*"
        },
        {
            "Sid": "AthenaResultsBucket",
            "Effect": "Allow",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket"
            ],
            "Resource": "arn:aws:s3:::<Results bucket>"
        },
        {
            "Sid": "AthenaResultsObjects",
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": "arn:aws:s3:::<Results bucket>/<Results prefix>*"
        }
    ]
}
```

| Statement                                     | Why Dropzone needs it                                                        |
| --------------------------------------------- | ---------------------------------------------------------------------------- |
| `AthenaQueries`                               | Start, check, read, and stop queries in the workgroup, and read its settings |
| `GlueCatalogRead`                             | Read the Security Lake database and table definitions                        |
| `LakeFormationDataAccess`                     | Let Athena read Security Lake data under your Lake Formation grants          |
| `AthenaResultsBucket`, `AthenaResultsObjects` | Write Athena query results and read them back                                |

The policy has no access to the Security Lake data bucket, because Lake Formation gives Athena that access. The Glue statement uses `*` because your Lake Formation grants decide which databases and tables the role can read.

{% hint style="info" %}
If your workgroup encrypts query results with SSE-KMS, add this statement with your key:

```json
{
    "Sid": "AthenaResultsKms",
    "Effect": "Allow",
    "Action": [
        "kms:GenerateDataKey",
        "kms:Decrypt"
    ],
    "Resource": "arn:aws:kms:<Region>:<AWS Account ID>:key/<Key ID>"
}
```

{% endhint %}

## Set Up Lake Formation Access

Follow the steps for the setup you chose.

### Role in the Security Lake Account

* In Lake Formation, [grant the Dropzone role](https://docs.aws.amazon.com/lake-formation/latest/dg/granting-cat-perms-named-resource.html) `DESCRIBE` on the Security Lake database, and `SELECT` and `DESCRIBE` on all tables in it

### Role in a Query Subscriber Account

1. In the Security Lake account, [create a subscriber with query access](https://docs.aws.amazon.com/security-lake/latest/userguide/create-query-subscriber-procedures.html)
   * Enter the AWS account ID that holds the Dropzone role
   * Choose the log sources Dropzone should see
   * Security Lake also asks for an external ID, which Dropzone does not use
2. In the subscriber account, [accept the AWS RAM resource share](https://docs.aws.amazon.com/lake-formation/latest/dg/accepting-ram-invite.html) within 12 hours
3. [Create a resource link](https://docs.aws.amazon.com/lake-formation/latest/dg/create-resource-link-database.html) to the shared Security Lake database
   * Use its name as the Glue Database value in Dropzone
4. In Lake Formation, [grant the Dropzone role](https://docs.aws.amazon.com/lake-formation/latest/dg/resource-links-about.html) `DESCRIBE` on the resource link, and `SELECT` and `DESCRIBE` on the shared tables

## Enable AWS Security Lake

To enable the Data Source integration, you will need the following information:

| Dropzone Field        | Required | Value                                                                                                                                        |
| --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Role ARN              | Yes      | The Security Lake role ARN, for example `arn:aws:iam::123456789012:role/SecurityLakeQuery`                                                   |
| Hub Role ARN          | No       | The hub role ARN, only when you use role chaining                                                                                            |
| Region                | Yes      | The Region of the Glue database and Athena workgroup, for example `us-east-1`                                                                |
| Glue Database         | Yes      | `amazon_security_lake_glue_db_<region>` in the Security Lake account, or the resource link name in a subscriber account                      |
| Athena Workgroup      | No       | The workgroup you prepared for Dropzone                                                                                                      |
| Athena Results S3 URI | No       | An `s3://` location for query results, for example `s3://amzn-s3-demo-bucket/dropzone/`. Leave it blank when the workgroup sets the location |
| Data Catalog          | No       | Leave as `AwsDataCatalog`                                                                                                                    |
| Query guidance        | No       | Instructions for how Dropzone's AI agent queries this data                                                                                   |

To enable the Data Source integration, do the following:

* Navigate to your Dropzone AI tenant home page e.g. https\://*mycompany*.dropzone.app
* In the left side bar, navigate to "Platform Settings" > Integrations

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2FQKQGU2YK0KqsewZWvh0i%2Fui-integrations-dropdown.png?alt=media" alt=""><figcaption><p>Integrations Dropdown</p></figcaption></figure>

* Click "Library"

{% hint style="info" %}
If you have previously integrated this application, click "Configured"
{% endhint %}

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2Fx4O3FuRG5IqPwx5sFuHr%2Fapp_system_integrations_library.png?alt=media" alt=""><figcaption><p>Click Library</p></figcaption></figure>

* In the Search bar, search "Security Lake", then click "Configure"
* Input the Role ARN, Region, and Glue Database, plus any optional fields you need

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2F9dCvRAjvYwjRBCNkCqDr%2Fapp_system_integrations_available_security_lake_config_1.png?alt=media" alt=""><figcaption><p>The AWS Security Lake Configuration (pt 1)</p></figcaption></figure>

* If you wish to guide Dropzone's AI agent in querying data, check "Enable" under "Query guidance"
  * Click "Add Item", then input conditions and instructions for the AI
  * Contact our Customer Success team for more information about this feature
* Click "Test & Save" to finish

<figure><img src="https://3968177484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDt9gEGwbp9ApiQAJP3hQ%2Fuploads%2FXGqDHFAAdA1r4ox2Om0l%2Fapp_system_integrations_available_security_lake_config_2.png?alt=media" alt=""><figcaption><p>The AWS Security Lake Configuration (pt 2)</p></figcaption></figure>

{% hint style="info" %}
The [Dropzone Connector](https://docs.dropzone.ai/platform/settings/connector.md) is optional for this integration. Dropzone always assumes the first role directly. With a connector, the connector host makes the Glue and Athena calls, plus the call to assume the Security Lake role when you set a Hub Role ARN, so it needs outbound HTTPS to Glue, Athena, and STS in your Region.
{% endhint %}

Test & Save assumes the role, reads the Glue database, and runs `SELECT 1` in the Athena workgroup. If a step fails, the error says which step failed and includes the AWS error. See the Troubleshooting section below.

After saving, the integration shows "Unscanned" until Dropzone finishes its first scan of the Glue database. To start the scan right away, click "Force Scan Now" under "Automatic Data Scan".

* The scan finds only the tables the role can see through your Lake Formation grants or subscriber sources
* Tables with only partition columns are skipped
* Each integration reads one Glue database in one Region
  * To query several Regions through one integration, set up a Security Lake [rollup Region](https://docs.aws.amazon.com/security-lake/latest/userguide/manage-regions.html)

If you have any errors contact our Customer Success team.

## Troubleshooting

| Error contains                                                                  | Check                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Security Lake Role ARN is required" or "must be an IAM role ARN"               | Enter the full role ARN, for example `arn:aws:iam::123456789012:role/SecurityLakeQuery`. Hub Role ARN uses the same format                                                                                                                                                    |
| "Security Lake Region is required" or "Security Lake Glue Database is required" | Fill in the field                                                                                                                                                                                                                                                             |
| "Dropzone could not assume the Security Lake role"                              | Check the Role ARN, and that the trust policy uses the `ARN` and `EXTERNAL ID` from the "Connection" section. With a Hub Role ARN, check that the hub role can assume the Security Lake role and that the Security Lake role trusts the hub role                              |
| "Dropzone's AWS credentials were rejected"                                      | Contact our Customer Success team                                                                                                                                                                                                                                             |
| "Glue database '...' was not found"                                             | Check Glue Database and Region. Use `amazon_security_lake_glue_db_<region>` in the Security Lake account, or the resource link name in a subscriber account. If the error also says "or the role cannot read it" and the name is right, check the `GlueCatalogRead` statement |
| "Lake Formation denied access to Glue database"                                 | Grant the role `DESCRIBE` on the database and `SELECT` and `DESCRIBE` on its tables                                                                                                                                                                                           |
| "Athena workgroup '...' was not found"                                          | Check Athena Workgroup and Region                                                                                                                                                                                                                                             |
| "Athena workgroup '...' is disabled"                                            | Enable the workgroup or choose another one                                                                                                                                                                                                                                    |
| "has no query result location"                                                  | Set a query result location on the workgroup, or fill in Athena Results S3 URI                                                                                                                                                                                                |
| "The role cannot write Athena query results"                                    | Check the `AthenaResultsBucket` and `AthenaResultsObjects` statements, and that `<Results prefix>` matches the query result location                                                                                                                                          |
| "Lake Formation denied the Athena test query"                                   | Grant the role `SELECT` and `DESCRIBE` on the tables. In a subscriber account, grant them on the shared tables                                                                                                                                                                |
| "The role is not allowed to run Athena queries"                                 | Check the `AthenaQueries` statement and the workgroup name in its Resource                                                                                                                                                                                                    |
| "but never started it"                                                          | The workgroup had no free query slot. Check what else is running in it and try again shortly                                                                                                                                                                                  |
| "AWS was temporarily unavailable"                                               | Try again shortly                                                                                                                                                                                                                                                             |
| "Dropzone could not reach AWS"                                                  | Try again shortly. With a connector, check that the connector host can reach AWS in your Region                                                                                                                                                                               |
