Guardrails and AWS SCPs

Can Guardrails work with SCPs that limit Region Access?

With the introduction of AWS Service Control Policies many organizations use them to limit the resources that their users deploy in unapproved regions. The security and cost management gains are considerable, but these restrictions can cause false alarms within the Guardrails console if certain policies are misconfigured.

Generally, SCPs are used to restrict the creation of resources outside of approved regions. Under normal operation, this could cause Guardrails to display errors in attempting to perform discovery in the unapproved regions, leading to alarms and errors in the console. Guardrails policy settings allow you to edit a list of available regions available in AWS. Any region outside of this list will be invisible to Guardrails; however, Guardrails recommends a defense-in-depth strategy as it pertains to region restrictions. SCPs are preventative controls, Guardrails can also provide detective and corrective controls across unapproved regions that would allow for a greater security and flexibility in the following situations:

To "turn off" a region in Guardrails, the policy AWS > Account > Regions [Default] can be configured to list only allowed regions. This policy can be configured at almost any level within the hierarchy, with the region itself being the lowest level.

Setting the policy:

  1. Navigate to the level at which the policy should be set in Guardrails. This will often be done at the Turbot level, but the scope of the policy will be determined based on the scope of the SCP across the organization.

  2. Select the Policies tab.

  3. Click the New Policy Setting button on the right side.

  4. In the Policy Type picker, search for Regions and select AWS > Account > Regions (the [Default] regions policy).

  5. Confirm the Resource field shows the level where the policy should apply. It defaults to the resource whose Policies tab you opened, so adjust it if you need to target a different level.

  6. List the approved regions in the Setting field. Each region goes on a new line, starting with a hyphen and space. The screenshot below is an example that approves the US East 1 and US West 1 regions in AWS. Policy setting editor listing the approved AWS regions in YAML

  7. Set the Precedence. Choose Required to mandate the region list on all descendant resources (the usual choice for restricting regions), or Recommended to set a default that descendants can override. Click Create to save the setting.

Guardrails will suspend action within unapproved regions immediately after setting the policy. Once again - this setting turns off Guardrails in unapproved regions and as such stops discovery and remediation.

If you have additional questions regarding Guardrails and AWS SCPs, reach out to Guardrails support at [email protected]