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.
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
| Action | Purpose |
|---|---|
securitylake:ListDataLakes, securitylake:ListLogSources | Find the Amazon Security Lake Data Lake in the Region, and the location of each Custom Source |
s3:PutObject on the Amazon Security Lake bucket | Write events to your Custom Sources |
glue:GetTable, glue:BatchCreatePartition on the Custom Source tables | Add 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:
| Resource | Lake Formation Permission | Purpose |
|---|---|---|
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 underscores | Alter | Add the partition for a new day of events |
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 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.
Create a role in your AWS account with a name that starts with SynqlyAccess (for example, SynqlyAccessS3Reader). This naming convention is required.
- In the AWS IAM console, go to Roles and choose Create role.
- For trusted entity type, choose Custom trust policy.
- 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.
- Name the role with a
SynqlyAccessprefix (for example,SynqlyAccessMyIntegration). - Attach the appropriate permissions policy for your use case.
- Create the role and note its ARN.
For more details, see:
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
When creating an AWS integration in Synqly, provide the following configuration values based on your chosen authentication method.
| Credential Parameter | Description |
|---|---|
| Role ARN | The ARN of the IAM role you created, for example arn:aws:iam::123456789012:role/SynqlyAccessMyIntegration. The role name must start with SynqlyAccess |
| External ID | The External ID you specified in the role's trust policy. This value must match exactly |
| Role Session Name | OPTIONAL: A name for the role session. If not specified, Synqly generates a default session name |
| Duration | OPTIONAL: 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) |
- Open the Amazon Security Lake Console with an AWS account that has permission to create Amazon Security Lake Custom Sources
- Select Custom sources from the sidebar on the left
- Select Create custom source
- In the section titled Custom source details, enter a name for the custom source
- Example:
detection-findings
- Example:
- Select the OCSF Event class that this custom source will be used for
- 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
- In the section titled Service Access, create a new service role or select an existing one
- Select Create
- Take note of the custom source name and the OCSF event class
- Repeat steps 3 to 9 for each OCSF event class that the integration will write
- 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
- Select Permissions > Data permissions from the sidebar on the left
- Select Grant
- Select IAM users and roles, then select the IAM role or user from the section titled AWS Credentials Configuration
- In the section titled LF-Tags or catalog resources, select Named data catalog resources
- Select the database
amazon_security_lake_glue_db_<region_underscored> - Select the tables named in the Resource column.
- In the section titled Table permissions, select the permissions named in the Lake Formation Permission column
- Select Grant
- Repeat steps 3 to 9 for each row of the table
| Integration Parameter | Description |
|---|---|
| Region | This is the AWS Region where you activated Amazon Security Lake and created the Custom Sources. Example: us-east-1 |
| Custom Log Sources > Account ID | This 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 > Mappings | This 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. |