Skip to content

Introduction

Amazon Security Lake is a fully managed AWS Service that centralizes security data from multiple sources and stores them in a data lake. This guide walks you through the steps to gather the necessary information and configure your service for the purpose of creating a new Amazon Security Lake Sink integration.

Prerequisites

Before you begin, ensure that you have:

  • Activated Amazon Security Lake
  • Access to an AWS account with the ability to create IAM policies, IAM roles, IAM users, and Amazon Security Lake Custom Sources.
  • Access to an AWS account with AWS Lake Formation data lake administrator permissions for the table associated with your Amazon Security Lake Data Lake
  • Knowledge of the OCSF Event classes that the integration will send, and the AWS Account ID that will send them

Required Permissions

ActionPurpose
securitylake:ListDataLakes, securitylake:ListLogSourcesFind the Amazon Security Lake Data Lake in the Region, and the location of each Custom Source
s3:PutObject on the Amazon Security Lake bucketWrite events to your Custom Sources
glue:GetTable, glue:BatchCreatePartition on the Custom Source tablesAdd the partition for a new day of events to the table of a Custom Source, so that the events can be queried straight away

Use the following policy document and replace these values:

  • <region>: the AWS Region that the integration will use. Example: us-east-1
  • <region_underscored>: the same AWS Region with underscores. Example: us_east_1
  • <account-id>: your AWS account ID. Example: 123456789012
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "SecurityLakeRead",
      "Effect": "Allow",
      "Action": ["securitylake:ListLogSources", "securitylake:ListDataLakes"],
      "Resource": "*"
    },
    {
      "Sid": "SecurityLakeCustomSourceWrite",
      "Effect": "Allow",
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::aws-security-data-lake-<region>-*/ext/*"
    },
    {
      "Sid": "SecurityLakeCustomSourcePartitions",
      "Effect": "Allow",
      "Action": ["glue:GetTable", "glue:BatchCreatePartition"],
      "Resource": [
        "arn:aws:glue:<region>:<account-id>:catalog",
        "arn:aws:glue:<region>:<account-id>:database/amazon_security_lake_glue_db_<region_underscored>",
        "arn:aws:glue:<region>:<account-id>:table/amazon_security_lake_glue_db_<region_underscored>/amazon_security_lake_table_<region_underscored>_ext_*"
      ]
    }
  ]
}

The integration also needs these Lake Formation permissions:

ResourceLake Formation PermissionPurpose
The table of each Custom Source, named amazon_security_lake_table_<region_underscored>_ext_<custom_source_name>, with the hyphens in the Custom Source name changed to underscoresAlterAdd the partition for a new day of events

AWS Credentials Configuration

Synqly supports two methods for authenticating with AWS: static credentials (IAM user access keys) and role-based access (IAM role assumption). Role-based access is recommended for production environments because it uses short-lived credentials and provides better auditability through CloudTrail.

Role-Based Access

Role-Based access is recommended and is considered an AWS best practice.

Role-based access uses AWS IAM roles to grant Synqly temporary credentials to access resources in your AWS account. This eliminates long-lived credentials and provides better security through the principle of least privilege.

1. Create an IAM Role

Create a role in your AWS account with a name that starts with SynqlyAccess (for example, SynqlyAccessS3Reader). This naming convention is required.

  1. In the AWS IAM console, go to Roles and choose Create role.
  2. For trusted entity type, choose Custom trust policy.
  3. Enter the following trust policy:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::733459310821:role/SynqlyIntegrationAccess"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "sts:ExternalId": "YOUR_EXTERNAL_ID"
        }
      }
    }
  ]
}

Replace YOUR_EXTERNAL_ID with a unique identifier you generate (for example, a UUID). You will provide this External ID when configuring the integration.

  1. Name the role with a SynqlyAccess prefix (for example, SynqlyAccessMyIntegration).
  2. Attach the appropriate permissions policy for your use case.
  3. Create the role and note its ARN.

For more details, see:

External ID Requirements

The External ID is a security mechanism that prevents the confused deputy problem. It ensures that only authorized requests from Synqly can assume your role.

The External ID must contain only the following characters:

  • Alphanumeric characters (a-z, A-Z, 0-9)
  • Special characters: + = , . @ : / -
  • Must be between 2 and 1224 characters in length

Configuring the Integration Credentials

When creating an AWS integration in Synqly, provide the following configuration values based on your chosen authentication method.

Credential ParameterDescription
Role ARNThe ARN of the IAM role you created, for example arn:aws:iam::123456789012:role/SynqlyAccessMyIntegration. The role name must start with SynqlyAccess
External IDThe External ID you specified in the role's trust policy. This value must match exactly
Role Session NameOPTIONAL: A name for the role session. If not specified, Synqly generates a default session name
DurationOPTIONAL: The duration of the role session in seconds. The value can range from 900 seconds (15 minutes) up to the maximum session duration configured on your role (default is 1 hour)

Creating Amazon Security Lake Custom Sources

  1. Open the Amazon Security Lake Console with an AWS account that has permission to create Amazon Security Lake Custom Sources
  2. Select Custom sources from the sidebar on the left
  3. Select Create custom source
  4. In the section titled Custom source details, enter a name for the custom source
    • Example: detection-findings
  5. Select the OCSF Event class that this custom source will be used for
  6. In the section titled AWS account with permission to write data, fill in the following fields:
    • AWS account ID: the ID of the AWS account that owns the IAM role or user from the section titled AWS Credentials Configuration
    • External ID: enter any value
  7. In the section titled Service Access, create a new service role or select an existing one
  8. Select Create
  9. Take note of the custom source name and the OCSF event class
  10. Repeat steps 3 to 9 for each OCSF event class that the integration will write

Granting Lake Formation Permissions

  1. Open the AWS Lake Formation Console with an AWS account that has administrator permissions for the table associated with your Amazon Security Lake Data Lake
  2. Select Permissions > Data permissions from the sidebar on the left
  3. Select Grant
  4. Select IAM users and roles, then select the IAM role or user from the section titled AWS Credentials Configuration
  5. In the section titled LF-Tags or catalog resources, select Named data catalog resources
  6. Select the database amazon_security_lake_glue_db_<region_underscored>
  7. Select the tables named in the Resource column.
  8. In the section titled Table permissions, select the permissions named in the Lake Formation Permission column
  9. Select Grant
  10. Repeat steps 3 to 9 for each row of the table

Configuring the Integration

Integration ParameterDescription
RegionThis is the AWS Region where you activated Amazon Security Lake and created the Custom Sources. Example: us-east-1
Custom Log Sources > Account IDThis is the AWS Account ID that you entered in the AWS account ID field when you created the Custom Sources. Example: 123456789012
Custom Log Sources > MappingsThis is the mapping of each Custom Source name to its OCSF Event class that was created in the section titled the section titled Creating Amazon Security Lake Custom Sources.