

# Security in Security Lake
<a name="security"></a>

Cloud security at AWS is the highest priority. As an AWS customer, you benefit from data centers and network architectures that are built to meet the requirements of the most security-sensitive organizations.

Security is a shared responsibility between AWS and you. The [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) describes this as security *of* the cloud and security *in* the cloud:
+ **Security of the cloud** – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third-party auditors regularly test and verify the effectiveness of our security as part of the [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/). To learn about the compliance programs that apply to Amazon Security Lake, see [AWS Services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope/).
+ **Security in the cloud** – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. 

This documentation helps you understand how to apply the shared responsibility model when using Security Lake. The following topics show you how to configure Security Lake to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Security Lake resources. 

**Topics**
+ [Identity and access management for Security Lake](security-iam.md)
+ [Data protection in Amazon Security Lake](data-protection.md)
+ [Compliance validation for Amazon Security Lake](compliance-validation.md)
+ [Security best practices for Security Lake](best-practices-overview.md)
+ [Resilience in Amazon Security Lake](disaster-recovery-resiliency.md)
+ [Infrastructure security in Amazon Security Lake](infrastructure-security.md)
+ [Configuration and vulnerability analysis in Security Lake](configuration-vulnerability-analysis.md)
+ [Amazon Security Lake and interface VPC endpoints (AWS PrivateLink)](security-vpc-endpoints.md)
+ [Monitoring Amazon Security Lake](monitoring-overview.md)

# Identity and access management for Security Lake
<a name="security-iam"></a>

AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be *authenticated* (signed in) and *authorized* (have permissions) to use Security Lake resources. IAM is an AWS service that you can use with no additional charge.

**Topics**
+ [Audience](#security_iam_audience)
+ [Authenticating with identities](#security_iam_authentication)
+ [Managing access using policies](#security_iam_access-manage)
+ [How Security Lake works with IAM](security_iam_service-with-iam.md)
+ [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md)
+ [AWS managed policies for Security Lake](security-iam-awsmanpol.md)
+ [Using service-linked roles for Security Lake](using-service-linked-roles.md)

## Audience
<a name="security_iam_audience"></a>

How you use AWS Identity and Access Management (IAM) differs based on your role:
+ **Service user** - request permissions from your administrator if you cannot access features (see [Troubleshooting Amazon Security Lake identity and access](security_iam_troubleshoot.md))
+ **Service administrator** - determine user access and submit permission requests (see [How Security Lake works with IAM](security_iam_service-with-iam.md))
+ **IAM administrator** - write policies to manage access (see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md))

## Authenticating with identities
<a name="security_iam_authentication"></a>

Authentication is how you sign in to AWS using your identity credentials. You must be authenticated as the AWS account root user, an IAM user, or by assuming an IAM role.

You can sign in as a federated identity using credentials from an identity source like AWS IAM Identity Center (IAM Identity Center), single sign-on authentication, or Google/Facebook credentials. For more information about signing in, see [How to sign in to your AWS account](https://docs.aws.amazon.com/signin/latest/userguide/how-to-sign-in.html) in the *AWS Sign-In User Guide*.

For programmatic access, AWS provides an SDK and CLI to cryptographically sign requests. For more information, see [AWS Signature Version 4 for API requests](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) in the *IAM User Guide*.

### AWS account root user
<a name="security_iam_authentication-rootuser"></a>

 When you create an AWS account, you begin with one sign-in identity called the AWS account *root user* that has complete access to all AWS services and resources. We strongly recommend that you don't use the root user for everyday tasks. For tasks that require root user credentials, see [Tasks that require root user credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks) in the *IAM User Guide*. 

### Federated identity
<a name="security_iam_authentication-federated"></a>

As a best practice, require human users to use federation with an identity provider to access AWS services using temporary credentials.

A *federated identity* is a user from your enterprise directory, web identity provider, or Directory Service that accesses AWS services using credentials from an identity source. Federated identities assume roles that provide temporary credentials.

For centralized access management, we recommend AWS IAM Identity Center. For more information, see [What is IAM Identity Center?](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the *AWS IAM Identity Center User Guide*.

### IAM users and groups
<a name="security_iam_authentication-iamuser"></a>

An *[IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)* is an identity with specific permissions for a single person or application. We recommend using temporary credentials instead of IAM users with long-term credentials. For more information, see [Require human users to use federation with an identity provider to access AWS using temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#bp-users-federation-idp) in the *IAM User Guide*.

An [https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) specifies a collection of IAM users and makes permissions easier to manage for large sets of users. For more information, see [Use cases for IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/gs-identities-iam-users.html) in the *IAM User Guide*.

### IAM roles
<a name="security_iam_authentication-iamrole"></a>

An *[IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)* is an identity with specific permissions that provides temporary credentials. You can assume a role by [switching from a user to an IAM role (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-console.html) or by calling an AWS CLI or AWS API operation. For more information, see [Methods to assume a role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_manage-assume.html) in the *IAM User Guide*.

IAM roles are useful for federated user access, temporary IAM user permissions, cross-account access, cross-service access, and applications running on Amazon EC2. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

## Managing access using policies
<a name="security_iam_access-manage"></a>

You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy defines permissions when associated with an identity or resource. AWS evaluates these policies when a principal makes a request. Most policies are stored in AWS as JSON documents. For more information about JSON policy documents, see [Overview of JSON policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policies-json) in the *IAM User Guide*.

Using policies, administrators specify who has access to what by defining which **principal** can perform **actions** on what **resources**, and under what **conditions**.

By default, users and roles have no permissions. An IAM administrator creates IAM policies and adds them to roles, which users can then assume. IAM policies define permissions regardless of the method used to perform the operation.

### Identity-based policies
<a name="security_iam_access-manage-id-based-policies"></a>

Identity-based policies are JSON permissions policy documents that you attach to an identity (user, group, or role). These policies control what actions identities can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

Identity-based policies can be *inline policies* (embedded directly into a single identity) or *managed policies* (standalone policies attached to multiple identities). To learn how to choose between managed and inline policies, see [Choose between managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-choosing-managed-or-inline.html) in the *IAM User Guide*.

### Resource-based policies
<a name="security_iam_access-manage-resource-based-policies"></a>

Resource-based policies are JSON policy documents that you attach to a resource. Examples include IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy.

Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy.

### Other policy types
<a name="security_iam_access-manage-other-policies"></a>

AWS supports additional policy types that can set the maximum permissions granted by more common policy types:
+ **Permissions boundaries** – Set the maximum permissions that an identity-based policy can grant to an IAM entity. For more information, see [Permissions boundaries for IAM entities](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) in the *IAM User Guide*.
+ **Service control policies (SCPs)** – Specify the maximum permissions for an organization or organizational unit in AWS Organizations. For more information, see [Service control policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) in the *AWS Organizations User Guide*.
+ **Resource control policies (RCPs)** – Set the maximum available permissions for resources in your accounts. For more information, see [Resource control policies (RCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html) in the *AWS Organizations User Guide*.
+ **Session policies** – Advanced policies passed as a parameter when creating a temporary session for a role or federated user. For more information, see [Session policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) in the *IAM User Guide*.

### Multiple policy types
<a name="security_iam_access-manage-multiple-policies"></a>

When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see [Policy evaluation logic](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) in the *IAM User Guide*.

# How Security Lake works with IAM
<a name="security_iam_service-with-iam"></a>

Before you use IAM to manage access to Security Lake, learn what IAM features are available to use with Security Lake.






**IAM features you can use with Amazon Security Lake**  

| IAM feature | Security Lake support | 
| --- | --- | 
|  [Identity-based policies](#security_iam_service-with-iam-id-based-policies)  |   Yes  | 
|  [Resource-based policies](#security_iam_service-with-iam-resource-based-policies)  |   Yes  | 
|  [Policy actions](#security_iam_service-with-iam-id-based-policies-actions)  |   Yes  | 
|  [Policy resources](#security_iam_service-with-iam-id-based-policies-resources)  |   Yes  | 
|  [Policy condition keys](#security_iam_service-with-iam-id-based-policies-conditionkeys)  |   Yes  | 
|  [ACLs](#security_iam_service-with-iam-acls)  |   No   | 
|  [ABAC (tags in policies)](#security_iam_service-with-iam-tags)  |   Yes  | 
|  [Temporary credentials](#security_iam_service-with-iam-roles-tempcreds)  |   Yes  | 
|  [Principal permissions](#security_iam_service-with-iam-principal-permissions)  |   Yes  | 
|  [Service roles](#security_iam_service-with-iam-roles-service)  |   No   | 
|  [Service-linked roles](#security_iam_service-with-iam-roles-service-linked)  |   Yes  | 

To get a high-level view of how Security Lake and other AWS services work with most IAM features, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

## Identity-based policies for Security Lake
<a name="security_iam_service-with-iam-id-based-policies"></a>

**Supports identity-based policies:** Yes

Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see [Define custom IAM permissions with customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create.html) in the *IAM User Guide*.

With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. To learn about all of the elements that you can use in a JSON policy, see [IAM JSON policy elements reference](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html) in the *IAM User Guide*.

Security Lake supports identity-based policies. For more information, see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md).

## Resource-based policies within Security Lake
<a name="security_iam_service-with-iam-resource-based-policies"></a>

**Supports resource-based policies:** Yes

Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM *role trust policies* and Amazon S3 *bucket policies*. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must [specify a principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html) in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services.

To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. For more information, see [Cross account resource access in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html) in the *IAM User Guide*.

The Security Lake service creates resource-based policies for the Amazon S3 buckets that store your data. You don't attach these resource-based policies to your S3 buckets. Security Lake automatically creates these policies on your behalf.

An example resource is an S3 bucket with an Amazon Resource Name (ARN) of `arn:aws:s3:::aws-security-data-lake-{region}-{bucket-identifier}`. In this example, `region` is a specific AWS Region where you've enabled Security Lake, and `bucket-identifier` is a Regionally unique alphanumeric string that Security Lake assigns to the bucket. Security Lake creates the S3 bucket to store data from that Region. The resource policy defines which principals can perform actions on the bucket. Here's a sample resource-based policy (bucket policy) that Security Lake attaches to the bucket:

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::aws-security-data-lake-{region}-{bucket-identifier}/*",
                "arn:aws:s3:::aws-security-data-lake-{region}-{bucket-identifier}"
            ],
            "Condition": {
                "Bool": {
                    "aws:SecureTransport": "false"
                }
            }
        },
        {
            "Sid": "PutSecurityLakeObject",
            "Effect": "Allow",
            "Principal": {
                "Service": "securitylake.amazonaws.com"
            },
            "Action": "s3:PutObject",
            "Resource": [
                "arn:aws:s3:::aws-security-data-lake-{region}-{bucket-identifier}/*",
                "arn:aws:s3:::aws-security-data-lake-{region}-{bucket-identifier}"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:SourceAccount": "{DA-AccountID}",
                    "s3:x-amz-acl": "bucket-owner-full-control"
                },
                "ArnLike": {
                    "aws:SourceArn": "arn:aws:securitylake:us-east-1:111122223333:*"
                }
            }
        }
    ]
}
```

------

To learn more about resource-based policies, see [Identity-based policies and resource-based policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html) in the *IAM User Guide*.

## Policy actions for Security Lake
<a name="security_iam_service-with-iam-id-based-policies-actions"></a>

**Supports policy actions:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Action` element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Include actions in a policy to grant permissions to perform the associated operation.



For a list of Security Lake actions, see [Actions defined by Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html#amazonsecuritylake-actions-as-permissions) in the *Service Authorization Reference*.

Policy actions in Security Lake use the following prefix before the action:

```
securitylake
```

For example, to grant a user permission to access information about a specific subscriber, include the `securitylake:GetSubscriber` action in the policy assigned to that user. Policy statements must include either an `Action` or `NotAction` element. Security Lake defines its own set of actions that describe tasks that you can perform with this service.

To specify multiple actions in a single statement, separate them with commas.

```
"Action": [
      "securitylake:action1",
      "securitylake:action2"
]
```





To view examples of Security Lake identity-based policies, see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md).

## Policy resources for Security Lake
<a name="security_iam_service-with-iam-id-based-policies-resources"></a>

**Supports policy resources:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Resource` JSON policy element specifies the object or objects to which the action applies. As a best practice, specify a resource using its [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html). For actions that don't support resource-level permissions, use a wildcard (\$1) to indicate that the statement applies to all resources.

```
"Resource": "*"
```

Security Lake defines the following resource types: subscriber, and the data lake configuration for an AWS account in a particular AWS Region. You can specify these types of resources in policies by using ARNs.

For a list of Security Lake resource types and the ARN syntax for each one, see [Resource types defined by Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html#amazonsecuritylake-resources-for-iam-policies) in the *Service Authorization Reference*. To learn which actions you can specify for each type of resource, see [Actions defined by Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html#amazonsecuritylake-actions-as-permissions) in the *Service Authorization Reference*.





To view examples of Security Lake identity-based policies, see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md).

## Policy condition keys for Security Lake
<a name="security_iam_service-with-iam-id-based-policies-conditionkeys"></a>

**Supports service-specific policy condition keys:** Yes

Administrators can use AWS JSON policies to specify who has access to what. That is, which **principal** can perform **actions** on what **resources**, and under what **conditions**.

The `Condition` element specifies when statements execute based on defined criteria. You can create conditional expressions that use [condition operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html), such as equals or less than, to match the condition in the policy with values in the request. To see all AWS global condition keys, see [AWS global condition context keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html) in the *IAM User Guide*.

For a list of Security Lake condition keys, see [Condition keys for Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html#amazonsecuritylake-policy-keys) in the *Service Authorization Reference*. To learn which actions and resources you can use a condition key with, see [Actions defined by Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html#amazonsecuritylake-actions-as-permissions) in the *Service Authorization Reference*. For examples of policies that use condition keys, see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md).

## Access control lists (ACLs) in Security Lake
<a name="security_iam_service-with-iam-acls"></a>

**Supports ACLs:** No 

Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format.

Security Lake doesn't support ACLs, which means you can't attach an ACL to a Security Lake resource.

## Attribute-based access control (ABAC) with Security Lake
<a name="security_iam_service-with-iam-tags"></a>

**Supports ABAC (tags in policies):** Yes

Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes called tags. You can attach tags to IAM entities and AWS resources, then design ABAC policies to allow operations when the principal's tag matches the tag on the resource.

To control access based on tags, you provide tag information in the [condition element](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) of a policy using the `aws:ResourceTag/key-name`, `aws:RequestTag/key-name`, or `aws:TagKeys` condition keys.

If a service supports all three condition keys for every resource type, then the value is **Yes** for the service. If a service supports all three condition keys for only some resource types, then the value is **Partial**.

For more information about ABAC, see [Define permissions with ABAC authorization](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_attribute-based-access-control.html) in the *IAM User Guide*. To view a tutorial with steps for setting up ABAC, see [Use attribute-based access control (ABAC)](https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) in the *IAM User Guide*.

You can attach tags to Security Lake resources—subscribers, and the data lake configuration for an AWS account in individual AWS Regions. You can also control access to these types of resources by providing tag information in the `Condition` element of a policy. For information about tagging Security Lake resources, see [Tagging Security Lake resources](tagging-resources.md). For an example of an identity-based policy that controls access to a resource based on the tags for that resource, see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md).

## Using temporary credentials with Security Lake
<a name="security_iam_service-with-iam-roles-tempcreds"></a>

**Supports temporary credentials:** Yes

Temporary credentials provide short-term access to AWS resources and are automatically created when you use federation or switch roles. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see [Temporary security credentials in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) and [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) in the *IAM User Guide*.

Security Lake supports the use of temporary credentials.

## Forward access sessions for Security Lake
<a name="security_iam_service-with-iam-principal-permissions"></a>

**Supports forward access sessions (FAS):** Yes

 Forward access sessions (FAS) use the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. For policy details when making FAS requests, see [Forward access sessions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_forward_access_sessions.html). 

Some Security Lake actions require permissions for additional, dependent actions in other AWS services. For a list of these actions, see [Actions defined by Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html#amazonsecuritylake-actions-as-permissions) in the *Service Authorization Reference*.



## Service roles for Security Lake
<a name="security_iam_service-with-iam-roles-service"></a>

**Supports service roles:** No 

 A service role is an [IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see [Create a role to delegate permissions to an AWS service](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html) in the *IAM User Guide*. 

Security Lake doesn't assume or use service roles. However, related services such as Amazon EventBridge, AWS Lambda, and Amazon S3 assume service roles when you use Security Lake. To perform actions on your behalf, Security Lake uses a service-linked role.

**Warning**  
Changing the permissions for a service role may create operational issues with your use of Security Lake. Edit service roles only when Security Lake provides guidance to do so.

## Service-linked roles for Security Lake
<a name="security_iam_service-with-iam-roles-service-linked"></a>

**Supports service-linked roles:** Yes

 A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. 

Security Lake uses an IAM service-linked role named `AWSServiceRoleForAmazonSecurityLake`. The Security Lake service-linked role grants permissions to operate a security data lake service on behalf of customers. This service-linked role is an IAM role that's linked directly to Security Lake. It's predefined by Security Lake, and it includes all the permissions that Security Lake requires to call other AWS services on your behalf. Security Lake uses this service-linked role in all the AWS Regions where Security Lake is available.

For details about creating or managing the Security Lake service-linked role, see [Using service-linked roles for Security Lake](using-service-linked-roles.md).

# Identity-based policy examples for Security Lake
<a name="security_iam_id-based-policy-examples"></a>

By default, users and roles don't have permission to create or modify Security Lake resources. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies.

To learn how to create an IAM identity-based policy by using these example JSON policy documents, see [Create IAM policies (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html) in the *IAM User Guide*.

For details about actions and resource types defined by Security Lake, including the format of the ARNs for each of the resource types, see [Actions, resources, and condition keys for Amazon Security Lake](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonsecuritylake.html) in the *Service Authorization Reference*.

**Topics**
+ [Policy best practices](#security_iam_service-with-iam-policy-best-practices)
+ [Using the Security Lake console](#security_iam_id-based-policy-examples-console)
+ [Example: Allow users to view their own permissions](#security_iam_id-based-policy-examples-view-own-permissions)
+ [Example: Allow the organization management account to designate and remove a delegated administrator](#security_iam_id-based-policy-examples-orgs)
+ [Example: Allow users to review subscribers based on tags](#security_iam_id-based-policy-examples-review-subscribers-tags)

## Policy best practices
<a name="security_iam_service-with-iam-policy-best-practices"></a>

Identity-based policies determine whether someone can create, access, or delete Security Lake resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations:
+ **Get started with AWS managed policies and move toward least-privilege permissions** – To get started granting permissions to your users and workloads, use the *AWS managed policies* that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) or [AWS managed policies for job functions](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html) in the *IAM User Guide*.
+ **Apply least-privilege permissions** – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as *least-privilege permissions*. For more information about using IAM to apply permissions, see [ Policies and permissions in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html) in the *IAM User Guide*.
+ **Use conditions in IAM policies to further restrict access** – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as CloudFormation. For more information, see [ IAM JSON policy elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the *IAM User Guide*.
+ **Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions** – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see [Validate policies with IAM Access Analyzer](https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-policy-validation.html) in the *IAM User Guide*.
+ **Require multi-factor authentication (MFA)** – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see [ Secure API access with MFA](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html) in the *IAM User Guide*.

For more information about best practices in IAM, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*.

## Using the Security Lake console
<a name="security_iam_id-based-policy-examples-console"></a>

To access the Amazon Security Lake console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the Security Lake resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy.

You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that they're trying to perform.

To ensure that users and roles can use the Security Lake console, create IAM policies that provide them with console access. For more information, see [IAM identities](https://docs.aws.amazon.com/IAM/latest/UserGuide/id.html) in the *IAM User Guide*.

If you create a policy that allows users or roles to use the Security Lake console, ensure that the policy includes the appropriate actions for the resources that those users or roles need to access on the console. Otherwise, they won't be able to navigate to or display details about those resources on the console.

For example, to add a custom source by using the console, a user must be allowed to perform these actions:
+ `glue:CreateCrawler`
+ `glue:CreateDatabase`
+ `glue:CreateTable`
+ `glue:StartCrawlerSchedule`
+ `iam:GetRole`
+ `iam:PutRolePolicy`
+ `iam:DeleteRolePolicy`
+ `iam:PassRole`
+ `lakeformation:RegisterResource`
+ `lakeformation:GrantPermissions`
+ `s3:ListBucket`
+ `s3:PutObject`

## Example: Allow users to view their own permissions
<a name="security_iam_id-based-policy-examples-view-own-permissions"></a>

This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API.

```
{
    "Version": "2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ViewOwnUserInfo",
            "Effect": "Allow",
            "Action": [
                "iam:GetUserPolicy",
                "iam:ListGroupsForUser",
                "iam:ListAttachedUserPolicies",
                "iam:ListUserPolicies",
                "iam:GetUser"
            ],
            "Resource": ["arn:aws:iam::*:user/${aws:username}"]
        },
        {
            "Sid": "NavigateInConsole",
            "Effect": "Allow",
            "Action": [
                "iam:GetGroupPolicy",
                "iam:GetPolicyVersion",
                "iam:GetPolicy",
                "iam:ListAttachedGroupPolicies",
                "iam:ListGroupPolicies",
                "iam:ListPolicyVersions",
                "iam:ListPolicies",
                "iam:ListUsers"
            ],
            "Resource": "*"
        }
    ]
}
```

## Example: Allow the organization management account to designate and remove a delegated administrator
<a name="security_iam_id-based-policy-examples-orgs"></a>

This example shows how you might create a policy that allows a user of an AWS Organizations management account to designate and remove the delegated Security Lake administrator for their organization.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "securitylake:RegisterDataLakeDelegatedAdministrator",
                "securitylake:DeregisterDataLakeDelegatedAdministrator"
            ],
            "Resource": "arn:aws:securitylake:*:*:*"
        }
    ]
}
```

------

## Example: Allow users to review subscribers based on tags
<a name="security_iam_id-based-policy-examples-review-subscribers-tags"></a>

In identity-based policies, you can use conditions to control access to Security Lake resources based on tags. This example shows how you might create a policy that allows a user to review subscribers by using the Security Lake console or the Security Lake API. However, permission is granted only if the value for the `Owner` tag for a subscriber is the user's username.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "ReviewSubscriberDetailsIfOwner",
            "Effect": "Allow",
            "Action": "securitylake:GetSubscriber",
            "Resource": "arn:aws:securitylake:*:*:subscriber/*",
            "Condition": {
                "StringEquals": {"aws:ResourceTag/Owner": "${aws:username}"}
            }
        },
        {
            "Sid": "ListSubscribersIfOwner",
            "Effect": "Allow",
            "Action": "securitylake:ListSubscribers",
            "Resource": "*",
            "Condition": {
                "StringEquals": {"aws:ResourceTag/Owner": "${aws:username}"}
            }
        }
    ]
}
```

------

In this example, if a user who has the username `richard-roe` attempts to review the details of individual subscribers, a subscriber must be tagged `Owner=richard-roe` or `owner=richard-roe`. Otherwise, the user is denied access. The condition tag key `Owner` matches both `Owner` and `owner` because condition key names are not case sensitive. For more information about using condition keys, see [IAM JSON policy elements: Condition](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the *IAM User Guide*. For information about tagging Security Lake resources, see [Tagging Security Lake resources](tagging-resources.md).







# AWS managed policies for Security Lake
<a name="security-iam-awsmanpol"></a>





An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles.

Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they're available for all AWS customers to use. We recommend that you reduce permissions further by defining [ customer managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#customer-managed-policies) that are specific to your use cases.

You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services.

For more information, see [AWS managed policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#aws-managed-policies) in the *IAM User Guide*.









## AWS managed policy: AmazonSecurityLakeMetastoreManager
<a name="security-iam-awsmanpol-AmazonSecurityLakeMetastoreManager"></a>

Amazon Security Lake uses an AWS Lambda function to manage metadata in your data lake. Through the use of this function, Security Lake can index Amazon Simple Storage Service (Amazon S3) partitions that contain your data and data files into the AWS Glue Data Catalog tables. This managed policy contains all of the permissions for the Lambda function to index the S3 partitions and data files into the AWS Glue tables.

**Permissions details**

This policy includes the following permissions:
+ `logs` – Allows principals to log the output of the Lambda function to Amazon CloudWatch Logs.
+ `glue` – Allows principals to perform specific write actions for AWS Glue Data Catalog tables. This also allows AWS Glue crawlers to identify partitions in your data.
+ `sqs` – Allows principals to perform specific read and write actions for Amazon SQS queues that send event notifications when objects are added to or updated in your data lake.
+ `s3` – Allows principals to perform specific read and write actions for the Amazon S3 bucket that contains your data.

To review the permissions for this policy, see [AmazonSecurityLakeMetastoreManager](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSecurityLakeMetastoreManager.html) in the *AWS Managed Policy Reference Guide*.

## AWS managed policy: AmazonSecurityLakePermissionsBoundary
<a name="security-iam-awsmanpol-AmazonSecurityLakePermissionsBoundary"></a>

Amazon Security Lake creates IAM roles for third-party custom sources to write data to the data lake and for third-party custom subscribers to consume data from the data lake, and uses this policy when creating these roles to define the boundary of their permissions. You don't need to take action to use this policy. If the data lake is encrypted with a customer managed AWS KMS key, `kms:Decrypt` and `kms:GenerateDataKey` permissions are added.

To review the permissions for this policy, see [AmazonSecurityLakePermissionsBoundary](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSecurityLakePermissionsBoundary.html) in the *AWS Managed Policy Reference Guide*.

## AWS managed policy: AmazonSecurityLakeAdministrator
<a name="security-iam-awsmanpol-AmazonSecurityLakeAdministrator"></a>

You can attach the `AmazonSecurityLakeAdministrator` policy to a principal before they enable Amazon Security Lake for their account. This policy grants administrative permissions that allow a principal full access to all Security Lake actions. The principal can then onboard to Security Lake and subsequently configure sources and subscribers in Security Lake.

This policy includes the actions that Security Lake administrators can perform on other AWS services through Security Lake. 

The `AmazonSecurityLakeAdministrator` policy does not support the creation of utility roles required by Security Lake to manage Amazon S3 cross-region replication, registration of new data partitions in AWS Glue, run a Glue crawler on data added to custom sources, or notify HTTPS endpoint subscribers of new data. You can create these roles ahead of time as described in [Getting started with Amazon Security Lake](getting-started.md).

In addition to the `AmazonSecurityLakeAdministrator` managed policy, Security Lake requires `lakeformation:PutDataLakeSettings` permissions for onboarding and configuration functions. `PutDataLakeSettings` allows setting an IAM principal as an administrator for all regional Lake Formation resources in the account. This role has to have `iam:CreateRole permission` as well as `AmazonSecurityLakeAdministrator` policy attached to it. 

Lake Formation administrators have full access to the Lake Formation console, and control the initial data configuration and access permissions. Security Lake assigns the principal that enables Security Lake and the `AmazonSecurityLakeMetaStoreManager` role (or other specified role) as Lake Formation administrators so that they can create tables, update table schema, register new partitions, and configure permissions on tables. You must include the following permissions in the policy for the Security Lake administrator user or role:

**Note**  
To provide sufficient permissions to grant Lake Formation based subscriber access, Security Lake recommends adding the following `glue:PutResourcePolicy` permissions.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AllowPutLakeFormationSettings",
      "Effect": "Allow",
      "Action": "lakeformation:PutDatalakeSettings",
      "Resource": "*",
      "Condition": {
        "ForAnyValue:StringEquals": {
          "aws:CalledVia": "securitylake.amazonaws.com"
        }
      }
    },
    {
      "Sid": "AllowGlueActions",
      "Effect": "Allow",
      "Action": ["glue:PutResourcePolicy", "glue:DeleteResourcePolicy"],
      "Resource": [
        "arn:aws:glue:*:*:catalog",
        "arn:aws:glue:*:*:database/amazon_security_lake_glue_db*",
        "arn:aws:glue:*:*:table/amazon_security_lake_glue_db*/*"
      ],
      "Condition": {
        "ForAnyValue:StringEquals": {
          "aws:CalledVia": "securitylake.amazonaws.com"
        }
      }
    }
  ]
}
```

------



**Permissions details**

This policy includes the following permissions.




+ `securitylake` – Allows principals full access to all Security Lake actions. 
+ `organizations` – Allows principals to retrieve information from AWS Organizations about the accounts in an organization. If an account belongs to an organization, then these permissions allow the Security Lake console to display account names and account numbers.
+ `iam` – Allows principals to create service-linked roles for Security Lake, AWS Lake Formation, and Amazon EventBridge, as a required step when enabling those services. Also allows for creation and editing of policies for subscriber and custom source roles, with permissions of those roles limited to what is allowed by the `AmazonSecurityLakePermissionsBoundary` policy. 
+ `ram` – Allows principals to configure Lake Formation-based query access by subscribers to Security Lake sources. 
+ `s3`– Allows principals to create and manage Security Lake buckets, and read the contents of those buckets. 
+ `lambda` – Allows principals to manage the Lambda used to update AWS Glue table partitions following AWS source delivery and cross-region replication. 
+ `glue` – Allows principals to create and manage the Security Lake database and tables. 
+ `lakeformation` – Allows principals to manage Lake Formation permissions for Security Lake tables. 
+ `events` – Allows principals to manage rules used to notify subscribers of new data in Security Lake sources. 
+ `sqs` – Allows principals to create and manage Amazon SQS queues used to notify subscribers of new data in Security Lake sources. 
+ `kms` – Allows principals to grant access for Security Lake to write data using a customer-managed key. 
+ `secretsmanager` – Allows principals to manage secrets used for notifying subscribers of new data in Security Lake sources via HTTPS endpoints. 



To review the permissions for this policy, see [AmazonSecurityLakeAdministrator](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonSecurityLakeAdministrator.html) in the *AWS Managed Policy Reference Guide*.

## AWS managed policy: SecurityLakeServiceLinkedRole
<a name="security-iam-awsmanpol-SecurityLakeServiceLinkedRole"></a>

Security Lake uses the service-linked role named `AWSServiceRoleForSecurityLake` to create and operate the security data lake.

You can't attach the `SecurityLakeServiceLinkedRole` managed policy to your IAM entities. This policy is attached to a service-linked role that permits Security Lake to perform actions on your behalf. For more information, see [Service-linked role permissions for Security Lake](https://docs.aws.amazon.com//security-lake/latest/userguide/slr-permissions.html).

## AWS managed policy: SecurityLakeResourceManagementServiceRolePolicy
<a name="security-iam-awsmanpol-SecurityLakeServiceLinkedRole-ResourceManagement"></a>

Security Lake uses the service-linked role named `AWSServiceRoleForSecurityLakeResourceManagement` to perform ongoing monitoring and performance improvements, which can reduce latency and costs. Provides access to manage resources created by Security Lake. Grants Security Lake the ability to delete SecurityLake\$1Glue\$1Partition\$1Updater\$1Lambda. This lambda has been deprecated for customers that have performed iceberg migration and moved on to v2 sources. This lambda was using Python 3.9 runtime which will be deprecated in December. Rather than updating the runtime for this lambda for those customers, it would be better to delete them. We have a recovery process that will determine if the customer still needs the lambda or not and delete them if they do not. This SLR update is required in order to allow us to delete that lambda.

You can't attach the `SecurityLakeResourceManagementServiceRolePolicy` managed policy to your IAM entities. This policy is attached to a service-linked role that permits Security Lake to perform actions on your behalf. For more information, see [Service-linked role permissions for resource management](https://docs.aws.amazon.com//security-lake/latest/userguide/AWSServiceRoleForSecurityLakeResourceManagement.html).

**Permissions details**

This policy includes the following permissions.
+ `events` – Allows principals to list and manage EventBridge rules for Security Lake event processing.
+ `lambda` – Allows principals to manage Lambda functions and configurations for Security Lake metadata processing, including the ability to delete deprecated partition updater functions.
+ `glue` – Allows principals to create partitions, manage tables, and access databases in the AWS Glue Data Catalog for Security Lake metadata management.
+ `s3` – Allows principals to manage Amazon S3 bucket configurations, lifecycle policies, and metadata objects for Security Lake data lake operations.
+ `logs` – Allows principals to access CloudWatch Logs streams and query log data for Security Lake Lambda functions.
+ `sqs` – Allows principals to manage Amazon SQS queues and messages for Security Lake data processing workflows.
+ `lakeformation` – Allows principals to retrieve data lake settings and permissions for Security Lake resource management.

To view more details about the policy, including the latest version of the JSON policy document, see [SecurityLakeResourceManagementServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/SecurityLakeResourceManagementServiceRolePolicy.html) in the *AWS Managed Policy Reference Guide*.

## AWS managed policy: AWSGlueServiceRole
<a name="security-iam-awsmanpol-AWSGlueServiceRole"></a>

The `AWSGlueServiceRole` managed policy invokes the AWS Glue crawler and permits AWS Glue to crawl custom source data and identify partition metadata. This metadata is necessary to create and update tables in the Data Catalog.

For more information, see [Collecting data from custom sources in Security Lake](custom-sources.md).





## Security Lake updates to AWS managed policies
<a name="security-iam-awsmanpol-updates"></a>



View details about updates to AWS managed policies for Security Lake since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the Security Lake Document history page.




| Change | Description | Date | 
| --- | --- | --- | 
|  [SecurityLakeResourceManagementServiceRolePolicy](#security-iam-awsmanpol-SecurityLakeServiceLinkedRole-ResourceManagement) – Updated existing policy  |  Security Lake updated the managed policy `SecurityLakeResourceManagementServiceRolePolicy` to add `lambda:DeleteFunction` permission for deprecated SecurityLake\$1Glue\$1Partition\$1Updater\$1Lambda functions. This allows Security Lake to clean up deprecated Lambda functions as part of the migration to v2 sources and iceberg format.  |  November 18, 2025  | 
|  [AWSServiceRoleForSecurityLakeResourceManagement](AWSServiceRoleForSecurityLakeResourceManagement.md) – Updated existing policy  |  This policy was updated to replace the `StringLike` operator with the `ArnLike` operator to evaluate the ARN-type keys for the `lambda:FunctionArn` in the `aws:ResourceAccount` condition block. This provides more secure enforcement.   |  September 25, 2025  | 
|  [Service-linked role for Amazon Security Lake](AWSServiceRoleForSecurityLakeResourceManagement.md) – New service-linked role  |  We added a new service-linked role `AWSServiceRoleForSecurityLakeResourceManagement`. This service-linked role provides permissions to Security Lake to perform ongoing monitoring and performance improvements, which can reduce latency and costs.   |  November 14, 2024  | 
|  [Service-linked role for Amazon Security Lake](using-service-linked-roles.md) – Update to existing service-linked role permissions  |  We added AWS WAF actions to the AWS managed policy for the `SecurityLakeServiceLinkedRole` policy. The additional actions allow Security Lake to collect AWS WAF logs, when it is enabled as a log source in Security Lake.  |  May 22, 2024  | 
| [AmazonSecurityLakePermissionsBoundary](#security-iam-awsmanpol-AmazonSecurityLakePermissionsBoundary) – Update to an existing policy |  Security Lake added SID actions to the policy.  |  May 13, 2024  | 
|  [AmazonSecurityLakeMetastoreManager](#security-iam-awsmanpol-AmazonSecurityLakeMetastoreManager) – Update to an existing policy  |  Security Lake updated the policy to add metadata clean up action which lets you delete the metadata in your data lake.  |  March 27, 2024  | 
|  [AmazonSecurityLakeAdministrator](#security-iam-awsmanpol-AmazonSecurityLakeAdministrator) – Update to an existing policy  |  Security Lake updated the policy to allow `iam:PassRole` on the new `AmazonSecurityLakeMetastoreManagerV2` role and lets Security Lake deploy or update data lake components.  |  February 23, 2024  | 
|  [AmazonSecurityLakeMetastoreManager](#security-iam-awsmanpol-AmazonSecurityLakeMetastoreManager) – New policy  |  Security Lake added a new managed policy that grants permissions for Security Lake to manage metadata in your data lake.  |  January 23, 2024  | 
|  [AmazonSecurityLakeAdministrator](#security-iam-awsmanpol-AmazonSecurityLakeAdministrator) – New policy  |  Security Lake added a new managed policy that grants a principal full access to all Security Lake actions.  |  May 30, 2023  | 
|  Security Lake started tracking changes  |  Security Lake started tracking changes for its AWS managed policies.  | November 29, 2022 | 

# Using service-linked roles for Security Lake
<a name="using-service-linked-roles"></a>

Security Lake uses AWS Identity and Access Management (IAM) [service-linked roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). A service-linked role is an IAM role that's linked directly to Security Lake. It's predefined by Security Lake, and it includes all the permissions that Security Lake requires to call other AWS services on your behalf and operate the security data lake service. Security Lake uses this service-linked role in all the AWS Regions where Security Lake is available.

The service-linked role eliminates the need to manually add the necessary permissions when setting up Security Lake. Security Lake defines the permissions of this service-linked role, and unless defined otherwise, only Security Lake can assume the role. The defined permissions include the trust policy and the permissions policy, and that permissions policy can't be attached to any other IAM entity.

You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see [Service-linked role permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the *IAM User Guide*. You can delete a service-linked role only after you delete its related resources. This protects your resources because you can't inadvertently remove permission to access the resources.

For information about other services that support service-linked roles, see [AWS services that work with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) and look for the services that have **Yes **in the **Service-linked roles** column. Choose a **Yes** with a link to review the service-linked role documentation for that service.

**Topics**
+ [Service-linked role (SLR) permissions for Security Lake](slr-permissions.md)
+ [Service-linked role (SLR) permissions for resource management](AWSServiceRoleForSecurityLakeResourceManagement.md)

# Service-linked role (SLR) permissions for Security Lake
<a name="slr-permissions"></a>

Security Lake uses the service-linked role named `AWSServiceRoleForSecurityLake`. This service-linked role trusts the `securitylake.amazonaws.com` service to assume the role. For more information about, AWS managed policies for Amazon Security Lake, see [AWS manage policies for Amazon Security Lake](https://docs.aws.amazon.com//security-lake/latest/userguide/security-iam-awsmanpol.html).

The permissions policy for the role, which is an AWS managed policy named `SecurityLakeServiceLinkedRole`, allows Security Lake to create and operate the security data lake. It also allows Security Lake to perform tasks such as the following on the specified resources:
+ Use AWS Organizations actions to retrieve information about associated accounts
+ Use Amazon Elastic Compute Cloud (Amazon EC2) to retrieve information about Amazon VPC Flow Logs
+ Use AWS CloudTrail actions to retrieve information about the service-linked role
+ Use AWS WAF actions to collect AWS WAF logs, when it is enabled as a log source in Security Lake
+ Use `LogDelivery` action to create or delete an AWS WAF log delivery subscription.

To review the permissions for this policy, see [SecurityLakeServiceLinkedRole](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/SecurityLakeServiceLinkedRole.html) in the *AWS Managed Policy Reference Guide*.

You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see [Service-linked role permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the *IAM User Guide*.

## Creating the Security Lake service-linked role
<a name="create-slr"></a>

You don't need to manually create the `AWSServiceRoleForSecurityLake` service-linked role for Security Lake. When you enable Security Lake for your AWS account, Security Lake automatically creates the service-linked role for you.

## Editing the Security Lake service-linked role
<a name="edit-slr"></a>

Security Lake doesn't allow you to edit the `AWSServiceRoleForSecurityLake` service-linked role. After a service-linked role is created, you can't change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see [Editing a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role) in the *IAM User Guide*.

## Deleting the Security Lake service-linked role
<a name="delete-slr"></a>

You cannot delete the service-linked role from Security Lake. Instead, you may delete the service-linked role from the IAM console, API, or AWS CLI. For more information, see [Deleting a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) in the *IAM User Guide*.

Before you can delete the service-linked role, you must first confirm that the role has no active sessions and remove any resources that `AWSServiceRoleForSecurityLake` is using.

**Note**  
If Security Lake is using the `AWSServiceRoleForSecurityLake` role when you try to delete the resources, the deletion might fail. If that happens, wait a few minutes and then try the operation again.

If you delete the `AWSServiceRoleForSecurityLake` service-linked role and need to create it again, you can create it again by enabling Security Lake for your account. When you enable Security Lake again, Security Lake automatically creates the service-linked role again for you.

## Supported AWS Regions for the Security Lake service-linked role
<a name="slr-regions"></a>

Security Lake supports using the `AWSServiceRoleForSecurityLake` service-linked role in all the AWS Regions where Security Lake is available. For a list of Regions where Security Lake is currently available, see [Security Lake Regions and endpoints](supported-regions.md).

# Service-linked role (SLR) permissions for resource management
<a name="AWSServiceRoleForSecurityLakeResourceManagement"></a>

Security Lake uses the service-linked role named `AWSServiceRoleForSecurityLakeResourceManagement` to perform ongoing monitoring and performance improvements, which can reduce latency and costs. This service-linked role trusts the `resource-management.securitylake.amazonaws.com` service to assume the role. Enabling `AWSServiceRoleForSecurityLakeResourceManagement` will also grant it access to Lake Formation and automatically register your Security Lake managed S3 buckets with Lake Formation across all Regions for improved security. 

 The permissions policy for the role, which is an AWS managed policy named `SecurityLakeResourceManagementServiceRolePolicy`, allows access to manage resources created by Security Lake; including managing the metadata in your data lake. For more information about, AWS managed policies for Amazon Security Lake, see [AWS managed policies for Amazon Security Lake](https://docs.aws.amazon.com//security-lake/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-SecurityLakeServiceLinkedRole-ResourceManagement.html).

This service-linked role allows Security Lake to monitor the health of the resources deployed by Security Lake (S3 Bucket, AWS Glue tables, Amazon SQS Queue, Metastore Manager (MSM) Lambda Function, and EventBridge rules) to your account. Some examples of operations that Security Lake can perform with this service-linked role are:
+ Apache Iceberg manifest file compaction, which improves query performance and lowers Lambda MSM processing times and costs.
+ Monitor the state of Amazon SQS to detect ingestion issues.
+ Optimize cross region data replication to exclude metadata files.

**Note**  
If you do not install the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role, Security Lake will continue to function but it's highly recommended to accept this service-linked role so Security Lake can monitor and optimize the resources in your account. 

**Permissions details**

The role is configured with the following permissions policy:




+ `events` – Allows principals to manage EventBridge rules required for log sources and log subscribers.
+ `lambda` – Allows principals to manage the lambda used to update AWS Glue table partitions following AWS source delivery and cross-region replication.
+ `glue` – Allows principals to perform specific write actions for AWS Glue Data Catalog tables. This also allows AWS Glue crawlers to identify partitions in your data, and allows Security Lake to manage Apache Iceberg metadata for your Apache Iceberg tables.
+ `s3` – Allows principals to perform specific read and write actions on the Security Lake buckets containing log data and Glue table metadata.
+ `logs` – Allows principals read access to log the output of the Lambda function to CloudWatch Logs.
+ `sqs` – Allows principals to perform specific read and write actions for Amazon SQS queues that receive event notifications when objects are added to or updated in your data lake.
+ `lakeformation` – Allows principals to read Lake Formation settings to monitor for misconfigurations.

To review the permissions for this policy, see [SecurityLakeResourceManagementServiceRolePolicy](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/SecurityLakeResourceManagementServiceRolePolicy.html) in the *AWS Managed Policy Reference Guide*.

You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete a service-linked role. For more information, see [Service-linked role permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#service-linked-role-permissions) in the *IAM User Guide*.

## Creating the Security Lake service-linked role
<a name="create-slr"></a>

You can create the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role for Security Lake using the Security Lake console or the AWS CLI.

To create the service-linked role you must grant the following permissions to your IAM user or IAM role. The IAM role must be a Lake Formation administrator in all Security Lake enabled Regions.

------
#### [ JSON ]

****  

```
{
  "Version":"2012-10-17",		 	 	 
  "Statement": [
    {
      "Sid": "AllowLakeFormationActionsViaSecurityLakeConsole",
      "Effect": "Allow",
      "Action": [
        "lakeformation:GrantPermissions",
        "lakeformation:ListPermissions",
        "lakeformation:ListResources",
        "lakeformation:RegisterResource",
        "lakeformation:RevokePermissions"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AllowIamActionsViaSecurityLakeConsole",
      "Effect": "Allow",
      "Action": [
        "iam:CreateServiceLinkedRole",
        "iam:GetPolicyVersion",
        "iam:GetRole",
        "iam:PutRolePolicy"
      ],
      "Resource": [
        "arn:*:iam::*:role/aws-service-role/resource-management.securitylake.amazonaws.com/AWSServiceRoleForSecurityLakeResourceManagement",
        "arn:*:iam::*:role/*AWSServiceRoleForLakeFormationDataAccess",
        "arn:*:iam::aws:policy/service-role/AWSGlueServiceRole",
        "arn:*:iam::aws:policy/service-role/AmazonSecurityLakeMetastoreManager",
        "arn:*:iam::aws:policy/aws-service-role/SecurityLakeResourceManagementServiceRolePolicy"
      ],
      "Condition": {
        "StringLikeIfExists": {
          "iam:AWSServiceName": [
            "securitylake.amazonaws.com",
            "resource-management.securitylake.amazonaws.com",
            "lakeformation.amazonaws.com"
          ]
        }
      }
    },
    {
      "Sid": "AllowGlueActionsViaConsole",
      "Effect": "Allow",
      "Action": [
        "glue:GetDatabase",
        "glue:GetTables"
      ],
      "Resource": [
        "arn:*:glue:*:*:catalog",
        "arn:*:glue:*:*:database/amazon_security_lake_glue_db*",
        "arn:*:glue:*:*:table/amazon_security_lake_glue_db*/*"
      ]
    }
  ]
}
```

------

------
#### [ Console ]

1. Open the Security Lake console at [https://console.aws.amazon.com/securitylake/](https://console.aws.amazon.com/securitylake/).

1. Accept the new service-linked role by clicking **Enable service-linked role** in the information bar on the Summary page.

Once you’ve enabled the service-linked role, you won’t need to repeat this process for future use of Security Lake.

------
#### [ CLI ]

To create the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role programatically, use the following CLI command. 

```
$ aws iam create-service-linked-role 
--aws-service-name resource-management.securitylake.amazonaws.com
```



When creating the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role using AWS CLI, you must also grant it Lake Formation table-level permissions (ALTER, DESCRIBE) to all tables on the Security Lake Glue database to manage table metadata and access data. If Glue tables in any region reference S3 buckets from previous Security Lake enablement, you must temporarily allow DATA\$1LOCATION\$1ACCESS permissions to the service-linked role to allow Security Lake to remediate this situation. 

You also have to grant Lake Formation permissions to the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role for your account.

The following example shows how to grant the Lake Formation permissions to the service-linked role in the designated Region. This example is formatted for Linux, macOS, or Unix, and it uses the backslash (\$1) line-continuation character to improve readability.

```
$ aws lakeformation grant-permissions --region {region} --principal DataLakePrincipalIdentifier={AWSServiceRoleForSecurityLakeResourceManagement ARN} \
--permissions ALTER DESCRIBE --resource '{ "Table": { "DatabaseName": "amazon_security_lake_glue_db_{region}", "TableWildcard": {} } }'
```

The following example shows how the Role ARN will look like. You must edit the Role ARN to match your Region.

`"AWS": "arn:[partition]:iam::[accountid]:role/aws-service-role/resource-management.securitylake.amazonaws.com/AWSServiceRoleForSecurityLakeResourceManagement"`

You can also use the [CreateServiceLinkedRole](https://docs.aws.amazon.com//IAM/latest/APIReference/API_CreateServiceLinkedRole.html) API call. In the request, specify the `AWSServiceName` as `resource-management.securitylake.amazonaws.com`.

------

After enabling the `AWSServiceRoleForSecurityLakeResourceManagement` role, if you are using AWS KMS Customer Managed Key (CMK) for encryption, you must allow the service-linked role to write encrypted objects to S3 buckets in the AWS Regions where CMK exists. In the AWS KMS console, add the following policy to the KMS key in the AWS Regions where CMK exists. For the details on how to change the KMS key policy, see [Key policies in AWS KMS](https://docs.aws.amazon.com//kms/latest/developerguide/key-policies.html) in the AWS Key Management Service Developer Guide.

```
{
    "Sid": "Allow SLR",
    "Effect": "Allow",
    "Principal": {
        "AWS": "arn:[partition]:iam::[accountid]:role/aws-service-role/resource-management.securitylake.amazonaws.com/AWSServiceRoleForSecurityLakeResourceManagement"
    },
    "Action": [
        "kms:Decrypt",
        "kms:GenerateDataKey*"
    ],
    "Resource": "*",
    "Condition": {
        "StringEquals": {
            "kms:EncryptionContext:aws:s3:arn": "arn:aws:s3:::[regional-datalake-s3-bucket-name]"
        },
        "StringLike": {
            "kms:ViaService": "s3.[region].amazonaws.com"
        }
    }
},
```

## Editing the Security Lake service-linked role
<a name="edit-slr"></a>

Security Lake doesn't allow you to edit the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role. After a service-linked role is created, you can't change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see [Editing a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#edit-service-linked-role) in the *IAM User Guide*.

## Deleting the Security Lake service-linked role
<a name="delete-slr"></a>

You cannot delete the service-linked role from Security Lake. Instead, you may delete the service-linked role from the IAM console, API, or AWS CLI. For more information, see [Deleting a service-linked role](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html#delete-service-linked-role) in the *IAM User Guide*.

Before you can delete the service-linked role, you must first confirm that the role has no active sessions and remove any resources that `AWSServiceRoleForSecurityLakeResourceManagement` is using.

**Note**  
If Security Lake is using the `AWSServiceRoleForSecurityLakeResourceManagement` role when you try to delete the resources, the deletion might fail. If that happens, wait a few minutes and then try the operation again.

If you delete the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role and need to create it again, you can create it again by enabling Security Lake for your account. When you enable Security Lake again, Security Lake automatically creates the service-linked role again for you.

## Supported AWS Regions for the Security Lake service-linked role
<a name="slr-regions"></a>

Security Lake supports using the `AWSServiceRoleForSecurityLakeResourceManagement` service-linked role in all the AWS Regions where Security Lake is available. For a list of Regions where Security Lake is currently available, see [Security Lake Regions and endpoints](supported-regions.md).

# Data protection in Amazon Security Lake
<a name="data-protection"></a>

The AWS [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) applies to data protection in Amazon Security Lake. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the [Data Privacy FAQ](https://aws.amazon.com/compliance/data-privacy-faq/). For information about data protection in Europe, see the [AWS Shared Responsibility Model and GDPR](https://aws.amazon.com/blogs/security/the-aws-shared-responsibility-model-and-gdpr/) blog post on the *AWS Security Blog*.

For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways:
+ Use multi-factor authentication (MFA) with each account.
+ Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3.
+ Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see [Working with CloudTrail trails](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-trails.html) in the *AWS CloudTrail User Guide*.
+ Use AWS encryption solutions, along with all default security controls within AWS services.
+ Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3.
+ If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see [Federal Information Processing Standard (FIPS) 140-3](https://aws.amazon.com/compliance/fips/).

We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a **Name** field. This includes when you work with Security Lake or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server.

## Encryption at rest
<a name="encryption-rest"></a>

Amazon Security Lake securely stores your data at rest using AWS encryption solutions. Raw security log and event data is stored in source-specific [multi-tenant Amazon Simple Storage Service (Amazon S3) buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/common-bucket-patterns.html#multi-tenant-buckets) in an account that Security Lake manages. Each log source has its own multi-tenant bucket. Security Lake encrypts this raw data using an [AWS owned key](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk) from AWS Key Management Service (AWS KMS). AWS owned keys are a collection of AWS KMS keys that an AWS service—in this case Security Lake—owns and manages for use in multiple AWS accounts.

Security Lake runs extract, transform, and load (ETL) jobs on raw log and event data. 

After the ETL jobs are completed, Security Lake creates single-tenant S3 buckets in your account (one bucket for each AWS Region that you've enabled Security Lake in). Data is stored in the multi-tenant S3 buckets only temporarily until Security Lake can reliably deliver the data to the single-tenant S3 buckets. The single-tenant buckets include a resource-based policy that gives Security Lake permission to write log and event data to the buckets. To encrypt data in your S3 bucket, you can choose either an [S3-managed encryption key](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html) or a [customer managed key ](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk) (from AWS KMS). Both options use symmetric encryption.

### Using a KMS key for encryption of your data
<a name="customer-managed-key"></a>

By default, the data delivered by Security Lake to your S3 bucket is encrypted by Amazon server-side encryption with [Amazon S3-managed encryption keys (SSE-S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html). To provide a security layer that you manage directly, you can instead use [server-side encryption with AWS KMS keys (SSE-KMS)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html) for your Security Lake data.

SSE-KMS isn't supported in the Security Lake console. To use SSE-KMS with the Security Lake API or CLI, you first [create a KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html) or use an existing key. You attach a policy to the key that determines which users can use the key for encrypting and decrypting Security Lake data.

If you use a customer managed key to encrypt data that's written to your S3 bucket, you can't choose a multi-Region key. For customer managed keys, Security Lake creates a [grant](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) on your behalf by sending a `CreateGrant` request to AWS KMS. Grants in AWS KMS are used to give Security Lake access to a KMS key in a customer account.

Security Lake requires the grant to use your customer managed key for the following internal operations:
+ Send `GenerateDataKey` requests to AWS KMS to generate data keys encrypted by your customer managed key.
+ Send `RetireGrant` requests to AWS KMS. When you make updates to your data lake, this operation enables the retirement of the grant that was added to the AWS KMS key for ETL processing.

Security Lake doesn't need `Decrypt` permissions. When authorized users of the key read Security Lake data, S3 manages the decryption, and the authorized users are able to read data in unencrypted form. However, a subscriber needs `Decrypt` permissions to consume source data. For more information about subscriber permissions, see [Managing data access for Security Lake subscribers](subscriber-data-access.md).

If you want to use an existing KMS key to encrypt Security Lake data, you must modify the key policy for the KMS key. The key policy must allow the IAM role associated with the Lake Formation data lake location to use the KMS key to decrypt the data. For instructions on how you can change the key policy for a KMS key, see [Changing a key policy](https://docs.aws.amazon.com//kms/latest/developerguide/key-policy-modifying.html) in the AWS Key Management Service Developer Guide.

Your KMS key can accept grant requests, allowing Security Lake to access the key, when you create a key policy or use an existing key policy with the appropriate permissions. For instructions on creating a key policy, see [Creating a key policy](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-overview.html) in the *AWS Key Management Service Developer Guide*. 

Attach the following key policy to your KMS key:

```
{
  "Sid": "Allow use of the key",
  "Effect": "Allow",
  "Principal": {"AWS": "arn:aws:iam::111122223333:role/ExampleRole"},
  "Action": [
    "kms:CreateGrant",
    "kms:DescribeKey",
    "kms:GenerateDataKey"
  ],
  "Resource": "*"
}
```

### Required IAM permissions when using a customer managed key
<a name="iam-permissions-key"></a>

See the [Getting started: Prerequisites](get-started-programmatic.md#prerequisites) section for an overview of IAM roles that you need to create to use Security Lake.

When you add a custom source or a subscriber, Security Lake creates IAM roles in your account. These roles are intended to be shared with other IAM identities. They permit a custom source to write data to the data lake and a subscriber to consume data from the data lake. An AWS managed policy called `AmazonSecurityLakePermissionsBoundary` sets the permission boundaries for these roles.

### Encrypting Amazon SQS queues
<a name="encrypt-sqs-queues"></a>

When you create your data lake, Security Lake creates two unencrypted Amazon Simple Queue Service (Amazon SQS) queues in the delegated Security Lake administrator account. You should encrypt these queues to protect your data. The default server-side encryption (SSE) provided by Amazon Simple Queue Service isn't sufficient. You must create a customer managed key in AWS Key Management Service (AWS KMS) to encrypt the queues and the grant the Amazon S3 service principal permissions to work with the encrypted queues. For instructions on granting these permissions, see [Why aren't Amazon S3 event notifications delivered to an Amazon SQS queue that uses server-side encryption?](https://repost.aws/knowledge-center/sqs-s3-event-notification-sse) in the AWS Knowledge Center.

Since Security Lake uses AWS Lambda to support extract, transfer, and load (ETL) jobs on your data, you must also give Lambda permissions to manage messages in your Amazon SQS queues. For information, see [Execution role permissions](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-permissions) in the *AWS Lambda Developer Guide*.

## Encryption in transit
<a name="encryption-transit"></a>

Security Lake encrypts all data in transit between AWS services. Security Lake protects data in transit, as it travels to and from the service, by automatically encrypting all inter-network data using the Transport Layer Security (TLS) 1.2 encryption protocol. Direct HTTPS requests sent to the Security Lake APIs are signed by using the [AWS Signature Version 4 Algorithm](https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html) to establish a secure connection.

# Opting out of using your data for service improvement
<a name="opting-out-of-using-your-data"></a>

You can choose to opt out of having your data used to develop and improve Security Lake and other AWS security services by using the AWS Organizations opt-out policy. You can choose to opt out even if Security Lake doesn't currently collect any such data. For more information about how to opt out, see [AI services opt-out policies](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) in the *AWS Organizations User Guide*. 

Presently, Security Lake does not collect any of the security data that it processes on your behalf, or security data that you upload to your security data lake created by this service. To develop and improve the Security Lake service and the functionalities of other AWS security services, Security Lake may collect such data in the future, including data that you upload from third-party data sources. We will update this page when Security Lake intends on collecting any such data and describe how this will work. You will still have an opportunity to opt out at any time.

**Note**  
For you to use the opt-out policy, your AWS accounts must be centrally managed by AWS Organizations. If you haven't already created an organization for your AWS accounts, see [Creating and managing an organization](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org.html) in the *AWS Organizations User Guide*.

Opting out has the following effects:
+ Security Lake will delete the data that it collected and stored prior to your opt out (if any).
+ After you opt out, Security Lake will no longer collect or store this data.

# Compliance validation for Amazon Security Lake
<a name="compliance-validation"></a>

To learn whether an AWS service is within the scope of specific compliance programs, see [AWS services in Scope by Compliance Program](https://aws.amazon.com/compliance/services-in-scope/) and choose the compliance program that you are interested in. For general information, see [AWS Compliance Programs](https://aws.amazon.com/compliance/programs/).

You can download third-party audit reports using AWS Artifact. For more information, see [Downloading Reports in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html).

Your compliance responsibility when using AWS services is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. For more information about your compliance responsibility when using AWS services, see [AWS Security Documentation](https://docs.aws.amazon.com/security/).

# Security best practices for Security Lake
<a name="best-practices-overview"></a>

See the following best practices for working with Amazon Security Lake.

## Grant Security Lake users minimum possible permissions
<a name="minimum-permissions"></a>

Follow the principle of least privilege by granting the minimum set of access policy permissions for your AWS Identity and Access Management (IAM) users, user groups, and roles. For example, you might allow an IAM user to view a list of log sources in Security Lake but not to create sources or subscribers. For more information, see [Identity-based policy examples for Security Lake](security_iam_id-based-policy-examples.md)

You can also use AWS CloudTrail to track API usage in Security Lake. CloudTrail provides a record of API actions taken by a user, group, or role in Security Lake. For more information, see [Logging Security Lake API calls using CloudTrail](securitylake-cloudtrail.md).

## View the Summary page
<a name="summary-page"></a>

The **Summary** page of the Security Lake console provides an overview of issue from the last 14 days that are impacting the Security Lake service and the Amazon S3 buckets in which your data is stored. You can further investigate these issues to help you mitigate possible security-related impact.

## Integrate with Security Hub CSPM
<a name="integrate-security-hub"></a>

Integrate Security Lake and AWS Security Hub CSPM to receive Security Hub CSPM findings in Security Lake. Security Hub CSPM generates findings from many different AWS services and third-party integrations. Receiving Security Hub CSPM findings helps you get an overview of your compliance posture and whether you're meeting AWS security best practices.

For more information, see [Integration with AWS Security Hub CSPM](securityhub-integration.md).

## Delete AWS Lambda
<a name="Lambda"></a>

When deleting a AWS Lambda function, we recommend against disabling it first. Disabling a Lambda function before deletion could interfere with data querying capabilities and potentially impact other functionalities. It's best to delete the Lambda function directly without disabling it. For more information on deleting Lambda function, see [AWS Lambda developer guide](https://docs.aws.amazon.com//lambda/latest/dg/example_lambda_DeleteFunction_section.html).

## Monitor for Security Lake events
<a name="monitor-cloudwatch-metrics"></a>

You can monitor Security Lake using Amazon CloudWatch metrics. CloudWatch collects raw data from Security Lake every minute and processes it into metrics. You can set alarms that trigger notifications when metrics match specified thresholds.

For more information, see [CloudWatch metrics for Amazon Security Lake](cloudwatch-metrics.md).

# Resilience in Amazon Security Lake
<a name="disaster-recovery-resiliency"></a>

The AWS global infrastructure is built around AWS Regions and Availability Zones. AWS Regions provide multiple physically separated and isolated Availability Zones, which are connected with low-latency, high-throughput, and highly redundant networking. These Availability Zones offer you an effective way to design and operate applications and databases. Availability Zones are more highly available, fault tolerant, and scalable than traditional single or multiple data center infrastructures.

The availability of Security Lake is tied to Region availability. Distribution across multiple Availability Zones helps the service tolerate failures in any single Availability Zone.

The availability of the Security Lake data plane is not tied to any Region availability. However, the availability of the Security Lake control plane is closely tied to US East (N. Virginia) Region availability.

For more information about AWS Regions and Availability Zones, see [AWS Global Infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/).

In addition to the AWS global infrastructure, Security Lake, in which data is backed by Amazon Simple Storage Service (Amazon S3); offers several features to help support your data resiliency and backup needs.

**Lifecycle configuration**  
A lifecycle configuration is a set of rules that define actions that Amazon S3 applies to a group of objects. With lifecycle configuration rules, you can tell Amazon S3 to transition objects to less expensive storage classes, archive them, or delete them. For more information, see [Managing your storage lifecycle](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) in the *Amazon S3 User Guide*.

**Versioning**  
Versioning is a means of keeping multiple variants of an object in the same bucket. You can use versioning to preserve, retrieve, and restore every version of every object stored in your Amazon S3 bucket. Versioning helps you recover from both unintended user actions and application failures. For more information, see [Using versioning in S3 buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html) in the *Amazon S3 User Guide*.

**Storage classes**  
Amazon S3 offers a range of storage classes to choose from depending on the requirements of your workload. The S3 Standard-IA and S3 One Zone-IA storage classes are designed for data you access about once a month and need milliseconds access. The S3 Glacier Instant Retrieval storage class is designed for long-lived archive data accessed with milliseconds access that you access about once a quarter. For archive data that does not require immediate access, such as backups, you can use the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes. For more information, see [Using Amazon S3 storage classes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html) in the *Amazon S3 User Guide*.

# Infrastructure security in Amazon Security Lake
<a name="infrastructure-security"></a>

As a managed service, Amazon Security Lake is protected by AWS global network security. For information about AWS security services and how AWS protects infrastructure, see [AWS Cloud Security](https://aws.amazon.com/security/). To design your AWS environment using the best practices for infrastructure security, see [Infrastructure Protection](https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/infrastructure-protection.html) in *Security Pillar AWS Well‐Architected Framework*.

You use AWS published API calls to access Security Lake through the network. Clients must support the following:
+ Transport Layer Security (TLS). We require TLS 1.2 and recommend TLS 1.3.
+ Cipher suites with perfect forward secrecy (PFS) such as DHE (Ephemeral Diffie-Hellman) or ECDHE (Elliptic Curve Ephemeral Diffie-Hellman). Most modern systems such as Java 7 and later support these modes.

# Configuration and vulnerability analysis in Security Lake
<a name="configuration-vulnerability-analysis"></a>

Configuration and IT controls are a shared responsibility between AWS and you, our customer. For more information, see the AWS [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/). 

# Amazon Security Lake and interface VPC endpoints (AWS PrivateLink)
<a name="security-vpc-endpoints"></a>

You can establish a private connection between your VPC and Amazon Security Lake by creating an *interface VPC endpoint*. Interface endpoints are powered by [AWS PrivateLink](https://aws.amazon.com/privatelink), a technology that enables you to privately access Security Lake APIs without an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC don't need public IP addresses to communicate with Security Lake APIs. Traffic between your VPC and Security Lake does not leave the Amazon network. 

Each interface endpoint is represented by one or more [Elastic Network Interfaces](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in your subnets. 

For more information, see [Interface VPC endpoints (AWS PrivateLink)](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html) in the *AWS PrivateLink Guide*. 

## Considerations for Security Lake VPC endpoints
<a name="vpc-endpoint-considerations"></a>

Before you set up an interface VPC endpoint for Security Lake, ensure that you review [Interface endpoint properties and limitations](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html#vpce-interface-limitations) in the *AWS PrivateLink Guide*. 

Security Lake supports making calls to all of its API actions from your VPC. 

Security Lake supports FIPS VPC endpoints only in the following Regions where FIPS exists:
+ US East (N. Virginia)
+ US East (Ohio)
+ US West (N. California)
+ US West (Oregon)

## Creating an interface VPC endpoint for Security Lake
<a name="vpc-endpoint-create"></a>

You can create a VPC endpoint for the Security Lake service using either the Amazon VPC console or the AWS Command Line Interface (AWS CLI). For more information, see [Create an interface endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html#create-interface-endpoint) in the *AWS PrivateLink Guide*.

Create a VPC endpoint for Security Lake using the following service name:

 
+ com.amazonaws.*region*.securitylake
+ com.amazonaws.*region*.securitylake-fips (FIPS endpoint)

If you enable private DNS for the endpoint, you can make API requests to Security Lake using its default DNS name for the Region, for example, `securitylake.us-east-1.amazonaws.com`. 

For more information, see [Access a service through an interface endpoint](https://docs.aws.amazon.com/vpc/latest/privatelink/vpce-interface.html#access-service-though-endpoint) in the *AWS PrivateLink Guide*.

## Creating a VPC endpoint policy for Security Lake
<a name="vpc-endpoint-policy"></a>

You can attach an endpoint policy to your VPC endpoint that controls access to Security Lake. The policy specifies the following information:
+ The principal that can perform actions.
+ The actions that can be performed.
+ The resources on which actions can be performed.

For more information, see [Control access to services with VPC endpoints](https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html) in the *AWS PrivateLink Guide*. 

**Example: VPC endpoint policy for Security Lake actions**  
The following is an example of an endpoint policy for Security Lake. When attached to an endpoint, this policy grants access to the listed Security Lake actions for all principals on all resources.

```
{
   "Statement":[
      {
         "Principal":"*",
         "Effect":"Allow",
         "Action":[
            "securitylake:ListDataLakes",
            "securitylake:ListLogSources",
            "securitylake:ListSubscribers"
         ],
         "Resource":"*"
      }
   ]
}
```

## Shared subnets
<a name="sh-vpc-endpoint-shared-subnets"></a>

You can't create, describe, modify, or delete VPC endpoints in subnets that are shared with you. However, you can use the VPC endpoints in subnets that are shared with you. For information about VPC sharing, see [Share your VPC with other accounts](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html) in the *Amazon VPC User Guide*.

# Monitoring Amazon Security Lake
<a name="monitoring-overview"></a>

Security Lake integrates with AWS CloudTrail, which is a service that provides a record of actions that were taken in Security Lake by a user, a role, or another AWS service. This includes actions from the Security Lake console and programmatic calls to Security Lake API operations. By using the information collected by CloudTrail, you can determine which requests were made to Security Lake. For each request, you can identify when it was made, the IP address from which it was made, who made it, and additional details. For more information, see [Logging Security Lake API calls using CloudTrail](securitylake-cloudtrail.md).

Security Lake and Amazon CloudWatch are integrated, so you can collect, view, and analyze metrics for logs that Security Lake collects. CloudWatch metrics for your Security Lake data lake are automatically collected and pushed to CloudWatch at one-minute intervals. You can also set an alarm to send you a notification if a specified threshold is met for a Security Lake metric. For a list of all the metrics that Security Lake sends to CloudWatch, see [Security Lake metrics and dimensions](cloudwatch-metrics.md#available-securitylake-metrics).

# CloudWatch metrics for Amazon Security Lake
<a name="cloudwatch-metrics"></a>

You can monitor Security Lake using Amazon CloudWatch, which collects raw data every minute and processes it into readable, near real-time metrics. These statistics are kept for 15 months, so that you can access historical information and gain a better perspective on the data in your data lake. You can also set alarms that watch for certain thresholds, and send notifications or take actions when those thresholds are met.

**Topics**
+ [Security Lake metrics and dimensions](#available-securitylake-metrics)
+ [Viewing CloudWatch metrics for Security Lake](#view-securitylake-metrics)
+ [Setting CloudWatch alarms for Security Lake metrics](#securitylake-alarm-metrics)

## Security Lake metrics and dimensions
<a name="available-securitylake-metrics"></a>

The `AWS/SecurityLake` namespace includes the following metrics.


| Metric | Description | 
| --- | --- | 
|  `ProcessedSize`  |  The volume of data from natively-supported AWS services that's currently stored in your data lake. Units: Bytes  | 

The following dimensions are available for Security Lake metrics.


| Dimension | Description | 
| --- | --- | 
|  `Account`  |  `ProcessedSize` metric for a specific AWS account. This dimension is available only when you view the `Per-Account Source Version Metrics` on CloudWatch.  | 
|  `Region`  |  `ProcessedSize` metric for a specific AWS Region.  | 
|  `Source`  |  `ProcessedSize` metric for a specific AWS log source.  | 
|  `SourceVersion`  |  `ProcessedSize` metric for a specific version of an AWS log source.  | 

You can view metrics for specific AWS accounts (`Per-Account Source Version Metrics`) or for all accounts in an organization (`Per-Source Version Metrics`).

## Viewing CloudWatch metrics for Security Lake
<a name="view-securitylake-metrics"></a>

You can monitor metrics for Security Lake using the CloudWatch console, CloudWatch's own command line interface (CLI), or programmatically using the CloudWatch API. Choose your preferred method, and follow the steps to access Security Lake metrics.

------
#### [ CloudWatch console ]

1. Open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. On the navigation pane, choose **Metrics, All metrics**.

1. On the **Browse** tab, choose **Security Lake**.

1. Choose **Per-Account Source Version Metrics** or **Per-Source Version Metrics**.

1. Select a metric to view it in detail. You can also choose to do the following:
   + To sort the metrics, use the column heading.
   + To graph a metric, select the metric name, and choose a graphing option.
   + To filter by metric, select the metric name and then choose **Add to search**.

------
#### [ CloudWatch API ]

To access Security Lake metrics using the CloudWatch API, use the [https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html) action.

------
#### [ AWS CLI ]

To access Security Lake metrics using the AWS CLI, run the [https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-statistics.html](https://docs.aws.amazon.com/cli/latest/reference/cloudwatch/get-metric-statistics.html) command.

------

For more information about monitoring using metrics, see [Use Amazon CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html) in the *Amazon CloudWatch User Guide*.

## Setting CloudWatch alarms for Security Lake metrics
<a name="securitylake-alarm-metrics"></a>

CloudWatch also allows you to set alarms when a threshold is met for a metric. For example, you could set an alarm for the **ProcessedSize** metric, so that you're notified when the volume of data from a specific source exceeds a specific threshold.

For instructions on setting alarms, see [Using Amazon CloudWatch alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html) in the *Amazon CloudWatch User Guide*.