Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: CC-BY-SA-4.0
AWS SRA Security Lake solution will automate enabling Amazon Security Lake by delegating administration to a Log Archive account and configuring Amazon Security Lake for all existing and future AWS Organization accounts.
Key solution features:
- Delegates the administration of Amazon Security Lake to a Log Archive account in the Security OU (Organizational Unit).
- Creates the required IAM roles for Amazon Security Lake.
- Configures the ingestion of AWS logs and event sources in all existing or specified accounts.
- Creates an organization configuration to automatically enable Amazon Security Lake for new member accounts in your organization.
- (Optional) Creates an Audit account (Security Tooling) subscriber with data access.
- (Optional) Creates an Audit account (Security Tooling) subscriber with query access.
- (Optional) Creates a resource link to shared tables in an Audit account (Security Tooling).
- All resources are deployed via AWS CloudFormation as a
StackSet
andStack Instance
within the management account or a CloudFormationStack
within a specific account. - The Customizations for AWS Control Tower solution deploys all templates as a CloudFormation
StackSet
. - For parameter details, review the AWS CloudFormation templates.
- The Lambda function includes logic to enable and configure Security Lake
- IAM role used by the Lambda function to enable the Security Lake Delegated Administrator Account within each region provided
- All the
AWS Lambda Function
logs are sent to a CloudWatch Log Group</aws/lambda/<LambdaFunctionName>
to help with debugging and traceability of the actions performed. - By default the
AWS Lambda Function
will create the CloudWatch Log Group and logs are encrypted with a CloudWatch Logs service managed encryption key.
- SQS dead letter queue used for retaining any failed Lambda events.
- SNS Topic used to notify subscribers when messages hit the DLQ.
- The python boto3 SDK lambda layer to enable capability for Lambda to enable features of the Security Lake service.
- This is downloaded during the deployment process and packaged into a layer that is used by the Lambda function in this solution.
- The Security Lake API available in the current Lambda environment (as of 09/03/2024) is 1.20.32, however, enhanced functionality of the Security Lake API used in this solution requires at least 1.35.10 (see references below).
- Note: Future revisions to this solution will remove this layer when boto3 is updated within the Lambda environment.
- The
Organization Compliance Scheduled Event Rule
triggers theAWS Lambda Function
to capture AWS Account status updates (e.g. suspended to active).- A parameter is provided to set the schedule frequency.
- IAM role used by Security Lake to create data lake or query data from Security Lake.
- The Configuration IAM Role is assumed by the Lambda function to configure Security Lake within the delegated administrator account.
- AWSServiceRoleForLakeFormationDataAccess role provides a set of Amazon Simple Storage Service (Amazon S3) permissions that enable the Lake Formation integrated service (such as Amazon Athena) to access registered locations.
- AWS KMS key to encrypt Security Lake data and Security Lake Amazon Simple Queue Service (Amazon SQS) queues.
- Security Lake is enabled in the delegated admin account within each provided region.
- Based on the specified parameters:
- Natively supported AWS log and event sources added in required Regions.
- Organization configuration created to automatically enable Amazon Security Lake for new member accounts in your organization.
- Audit account (Security Tooling) subscriber with data access created.
- Audit account (Security Tooling) subscriber with query access created.
- Resource link to shared tables created in the Audit account (Security Tooling).
The example solutions use Audit Account
instead of Security Tooling Account
to align with the default account name used within the AWS Control Tower
setup process for the Security Account. The Account ID for the Audit Account
SSM parameter is
populated from the SecurityAccountId
parameter within the AWSControlTowerBP-BASELINE-CONFIG
StackSet, but is specified manually in other environments, and then stored in an SSM parameter (this is all done in the common prerequisites solution).
- The Subscriber Configuration IAM Role is assumed by the Lambda function to configure resource link to shared tables within the Audit account.
- The resource share invitation is accepted within the Audit account.
- A resource link to the shared Lake Formation tables is created in AWS Glue to point the subscriber's account to the shared tables.
- Download and Stage the SRA Solutions. Note: This only needs to be done once for all the solutions.
- Verify that the SRA Prerequisites Solution has been deployed.
- Verify that the AmazonSecurityLakeMetaStoreManagerV2 IAM role does not exist in the Log Archive account. If the role exists, either modify the sra-security-lake-org-main-ssm.yaml template or delete the role.
- Verify that the AWSServiceRoleForLakeFormationDataAccess IAM role does not exist in the Log Archive account. If the role exists, either modify the sra-security-lake-org-main-ssm.yaml template or delete the role.
Choose a Deployment Method:
In the management account (home region)
, launch the sra-security-lake-org-main-ssm.yaml template. This uses an approach where some of the CloudFormation parameters are populated from SSM parameters created by the SRA Prerequisites Solution.
aws cloudformation deploy --template-file $PWD/aws_sra_examples/solutions/security_lake/security_lake_org/templates/sra-security-lake-org-main-ssm.yaml --stack-name sra-security-lake-org-main-ssm --capabilities CAPABILITY_NAMED_IAM --parameter-overrides pSecurityLakeWarning=<ACCEPT_OR_REJECT>
Pay close attention to the --parameter-overrides
argument. For launching of the AWS Cloudformation stack using the command above to be successful, the pSecurityLakeWarning
parameter in the --parameter-overrides
argument must be set to Accept
. If it is set to Reject
the stack launch will fail and provide an error.
- To create an Audit account subscriber with data access, add
pRegisterAuditAccountDataSubscriber
parameter in the--parameter-overrides
with argument set totrue
. Provide value forpAuditAccountDataSubscriberExternalId
parameter. - To create an Audit account subscriber with query access, add
pRegisterAuditAccountQuerySubscriber
parameter in the--parameter-overrides
with argument set totrue
. Provide value forpAuditAccountQuerySubscriberExternalId
parameter. - To creates a resource link to shared tables in an Audit account, add
pCreateResourceLink
parameter in the--parameter-overrides
with argument set totrue
- Log into the
Log Archive account
and navigate to the Security Lake page- Select Summary
- Verify that Security Lake is enabled for each region
- Select Sources
- Verify requested sources are enabled for each region and account
- To verify that Organization Configuration is ON in each region, run command
aws securitylake get-data-lake-organization-configuration
in the CLI or CloudShell - Select Subscribers
- Verify that the Audit account query and/or data access subscribers are created
- If an Audit account subscriber with query access was created, Log into the
Audit audit
- Navigate to AWS Glue
- Select Databases
- Verify
amazon_security_lake_glue_db_<REGION>_subscriber
database is created - Select Tables
- Verify that resource links to shared tables were created
- Navigate to Athena
- Create a new query and verify that the query executes successfully. Note: The Lake Formation data lake administrator must grant SELECT permissions on the relevant databases and tables to the IAM identity that queries the data.
- Download and Stage the SRA Solutions. Note: Get the latest code and run the staging script.
- Update the existing CloudFormation Stack or CFCT configuration. Note: Make sure to update the
SRA Solution Version
parameter and any new added parameters.
- In the
management account (home region)
, change theDisable Security Lake log sources and organization configuration
parameter totrue
and update the AWS CloudFormation Stack (sra-security-lake-org-main-ssm
). This will disable the AWS log and event source collection and delete organization configuration in all regions. Note: Security Lake will stop collecting logs and events from your AWS sources, but the existing Security Lake settings and the resources that were created in your AWS account, including AmazonSecurityLakeMetaStoreManagerV2, AWSServiceRoleForLakeFormationDataAccess IAM roles and KMS keys, will be retained. Refer to the Amazon Security Lake documentation for the recommended steps to address the service and resources. - In the
management account (home region)
, delete the AWS CloudFormation Stack (sra-security-lake-org-main-ssm
). - In the
management account (home region)
, delete the AWS CloudWatch Log Group (e.g. /aws/lambda/<solution_name>) for the Lambda function deployed.