AWS GovCloud Integration
Lacework now provides AWS GovCloud support for Resource Inventory, which allows GovCloud customers to migrate to the new CSPM Compliance engine based on LPP/LQL.
AWS GovCloud (US-East and US-West) are isolated regions within AWS for customers to host sensitive data for supporting their regulated workflows. The configuration workflows described below differ from AWS standard regions and are relevant for monitoring only AWS GovCloud environments within the Lacework application.
Creating an integration between Lacework and an AWS GovCloud requires running steps in the AWS GovCloud console followed by running additional steps in the Lacework Console.
The steps below configure AWS CloudTrail (US GovCloud) with AWS Config (US GovCloud) integration.
If you want to integrate AWS GovCloud using Terraform, see Configuration (US GovCloud) Integration with Terraform or CloudTrail and Configuration (US GovCloud) Integration with Terraform.
AWS Setup
Create the Lacework AWS GovCloud CloudFormation Template
You must create an AWS GovCloud CloudFormation template file that creates a new AWS GovCloud CloudFormation stack.
- Right-click and download the Lacework GovCloud CloudFormation template.
- In a text editor, replace the %acnt string with the name of your AWS account.
"Parameters": {
"ResourceNamePrefix":
{
...
"Default": "%acnt",
...
}, - Save the file.
Create a Stack in CloudFormation Using the Customized CloudFormation Template
- Log in to an AWS account on the AWS GovCloud with administrative credentials. The AWS account used to create the stack must use a role with the aws:policy/SecurityAudit permission.
- Select the CloudFormation service. In the AWS console, select Services > Management & Governance > CloudFormation.
- Select the appropriate region for your environment.
- Click Create stack and select With new resources.
- Under Specify template, select Upload a template file.
- Click Choose file and browse for the Lacework AWS GovCloud template file that you previously downloaded and updated. Then click Open.
- Click Next.
Specify Stack Details
- In the Stack name field, enter a unique value.
- Click Next.
- On the Create stack > Specify Details page, create a new trail and S3 bucket.
- Resource name prefix should be pre-populated with your account name. The value does not need to change unless:
- You are creating a stack for each account - For this case, the value must be unique for each account because the S3 bucket namespace is global.
- You are creating multiple stacks - For this case, the value must be unique to avoid a resource collision.
- Set Create new trail? to Yes.
- If you want a specific S3 bucket path for your logs, add a Log file prefix.
- Leave the values for Bucket name and Topic ARN blank.
- Click Next.
Continue Stack Creation and Gather Settings
Complete the creation of the stack in the AWS console and gather the required settings as described by the following steps.
- In the Configure stack options page, no changes are required. Click Next.
- In the Review page, select the acknowledgment and click Submit. After clicking Submit, you are redirected back to the CloudFormation page.
- If you do not see your new stack in the table, refresh the page. Keep refreshing the page until the status of the stack is CREATE-COMPLETE.
- After the stack status is CREATE-COMPLETE, click the stack name link.
- Expand Outputs.
- Leave the AWS console open to this page so you can copy the following values about the stack:
- AccountId
- AccessKeyId
- SecretAccessKey
- SQSQueueURL
Use the Lacework Console
You can use the Lacework Console for AWS GovCloud manual configuration.
- Log in to the Lacework Console.
- Go to Settings > Integrations > Cloud accounts.
- Click + Add New.
- Click Amazon Web Services and select Manual configuration.
- Click Next.
- Select a GovCloud integration type and follow the corresponding steps.
- Configuration (US GovCloud) to analyze AWS configuration compliance.
- CloudTrail and Configuration (US GovCloud) to analyze CloudTrail activity for monitoring cloud account security and AWS configuration compliance.
Configuration (US GovCloud) Manual Integration
Ensure you have completed AWS setup as described in AWS Setup.
- For Name, specify a unique name that displays in the Lacework Console.
- For Account ID, enter your AWS account identifier or alias.
- For Access Key ID, enter the AccessKeyId value from the AWS console.
- For Secret Access Key, enter the SecretAccessKey value from the AWS console.
- Click Save to finish the AWS integration and save your onboarding progress.
The integration appears in the list of cloud accounts under Cloud accounts.
CloudTrail and Configuration (US GovCloud) Manual Integration
Ensure you have completed AWS setup as described in AWS Setup.
- For Name, specify a unique name that displays in the Lacework Console.
- For Account ID, enter your AWS account identifier or alias.
- For Access Key ID, enter the AccessKeyId value from the AWS console.
- For Secret Access Key, enter the SecretAccessKey value from the AWS console.
- For, SQSQueueURL, specify the Amazon Simple Queue Service (SQS) URL value.
- Click Save to finish the AWS integration and save your onboarding progress.
The integration appears in the list of cloud accounts under Cloud accounts.
Use Terraform
Configuration (US GovCloud) Integration with Terraform
For organizations using Terraform to manage their environments, Lacework maintains the Terraform provider for Lacework, which enables configuration of Lacework integrations using automation.
If you are new to the Lacework Terraform Provider or Lacework Terraform Modules, read the Terraform for Lacework Overview to learn the basics on how to configure the provider and more.
- Ensure you have the Lacework CLI installed and configured to the Lacework account you plan to integrate.
- Install the AWS CLI. For details on how to install the AWS CLI, see Configuring your AWS CLI.
- Open an editor (such as Vim) and create a new Terraform file called main.tf.
- Edit the Terraform file to specify the Lacework AWS US GovCloud Terraform provider by copying and pasting the code under Use Provider in the Lacework Terraform provider for AWS Config US GovCloud into your Terraform file.
- Add the
lacework_integration_aws_govcloud_cfg
Terraform resource and its related parameters, such as the name, account_id and credentials, into your Terraform file. For an example of this Terraform resource and parameters to use for AWS US GovCloud, see Example Usage and GovCloud Terraform Example. - Open a Terminal and change directories to the directory that contains the Terraform file (~/lacework/aws) and run
terraform init
to initialize the project and download the required modules. - Run
terraform plan
to validate the configuration and review pending changes. - After you review the pending changes,
run terraform apply
to execute changes.noteThis Lacework Terraform provider has a number of inputs for customization. Visit the documentation on the lacework_integration_aws_govcloud_cfg for the complete list of inputs.
- After Terraform finishes applying changes, use the Lacework CLI or log in to the Lacework Console to validate the integration.
- To validate the integration using the CLI, run the
lacework cloud-account list
command. You should seeAwsUsGovCfg
for the Configuration integration - To validate the integration using the Lacework Console, log in to your account and go to Settings > Cloud Accounts.
- To validate the integration using the CLI, run the
- Go back to the Lacework Console onboarding page and click Exit to finish the AWS integration and save your onboarding progress. The integration appears in the list of cloud accounts under Cloud accounts.
CloudTrail and Configuration (US GovCloud) Integration with Terraform
For organizations using Terraform to manage their environments, Lacework maintains the Terraform provider for Lacework, which enables configuration of Lacework integrations using automation.
If you are new to the Lacework Terraform Provider or Lacework Terraform Modules, read the Terraform for Lacework Overview to learn the basics on how to configure the provider and more.
- Ensure you have the Lacework CLI installed and configured to the Lacework account you plan to integrate.
- Install the AWS CLI. For details on how to install the AWS CLI, see Configuring your AWS CLI.
- Open an editor (such as Vim) and create a new Terraform file called main.tf.
- Edit the Terraform file to specify the Lacework AWS US GovCloud Terraform provider by copying and pasting the code under Use Provider in the Lacework Terraform provider for AWS Config US GovCloud into your Terraform file.
- Add the
lacework_integration_aws_govcloud_cfg
Terraform resource and its related parameters, such as the name, account_id and credentials, into your Terraform file. For an example of this Terraform resource and parameters to use for AWS US GovCloud, see Example Usage and GovCloud Terraform Example. - Add the
lacework_integration_aws_govcloud_ct
Terraform resource and its related parameters, such as the name, account_id, queue_url and credentials, into your Terraform file. For an example of this Terraform resource and parameters to use for AWS CloudTrail US GovCloud, see Example Usage and GovCloud Terraform Example. - Open a Terminal and change directories to the directory that contains the Terraform file (~/lacework/aws) and run
terraform init
to initialize the project and download the required modules. - Run
terraform plan
to validate the configuration and review pending changes. - After you review the pending changes,
run terraform apply
to execute changes.noteThis Lacework Terraform provider has a number of inputs for customization. Visit the documentation on the lacework_integration_aws_govcloud_cfg and lacework_integration_aws_govcloud_ct for the complete list of inputs.
- After Terraform finishes applying changes, use the Lacework CLI or log in to the Lacework Console to validate the integration.
- To validate the integration using the CLI, run the
lacework cloud-account list
command. You should see two integrations:AwsUsGovCfg
for the Configuration integration, andAwsUsGovCtSqs
for the CloudTrail integration. - To validate the integration using the Lacework Console, log in to your account and go to Settings > Cloud Accounts.
- To validate the integration using the CLI, run the
- Go back to the Lacework Console onboarding page and click Exit to finish the AWS integration and save your onboarding progress. The integration appears in the list of cloud accounts under Cloud accounts.
Terraform GovCloud Examples
# Configure AWS GovCloud Config integration in Lacework
resource "lacework_integration_aws_govcloud_cfg" "example" {
name = "AWS gov cloud config integration example"
account_id = "553453453"
credentials {
access_key_id = "AWS123abcAccessKeyID"
secret_access_key = "AWS123abc123abcSecretAccessKey0000000000"
}
}
# Configure AWS GovCloud CloudTrail integration in Lacework
resource "lacework_integration_aws_govcloud_ct" "example" {
name = "AWS gov cloud cloudtrail integration example"
account_id = "553453453"
queue_url = "https://sqs.us-gov-west-1.amazonaws.com/123456789012/my_queue"
credentials {
access_key_id = "AWS123abcAccessKeyID"
secret_access_key = "AWS123abc123abcSecretAccessKey0000000000"
}
}
You can find additional information on the lacework_integration_aws_govcloud_cfg
and lacework_integration_aws_govcloud_ct
resources in the Terraform Registry.