Lesson 4 of 6 AWS Organizations and AWS Control Tower

Enforcing Configuration with Declarative, Tag and Backup Policies

This lesson explains the AWS Organizations policy types that enforce service configuration, tagging, backups and the use of content by AI services consistently across every account, besides SCPs and RCPs.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the management policy types and what each enforces.
  • Choose between a declarative policy and an SCP.
  • Explain how inheritance operators combine policies.

The policy types

Besides SCPs and RCPs, AWS Organizations has policy types that set configuration rather than permissions. Declarative policies enforce the desired configuration of EC2 and VPC settings across accounts, such as IMDSv2 defaults, blocking public sharing of AMIs and snapshots, VPC Block Public Access and allowed AMIs. Because they set the service's configuration, not individual API permissions, they stay effective when AWS adds new APIs. Tag policies standardise tag keys and values, and can prevent non-compliant tagging.

Backup policies deploy AWS Backup plans to accounts centrally. AI services opt-out policies stop AWS AI services from storing or using your content to improve those services. The following table summarises the policy types.

PolicyDoes
Declarative policiesEnforce EC2 and VPC configuration (IMDSv2 defaults, no public AMI or snapshot sharing, VPC Block Public Access, allowed AMIs); stay effective as new APIs launch
Tag policiesStandardise tag keys and values, and optionally prevent non-compliant tagging
Backup policiesDeploy AWS Backup plans to accounts
AI services opt-out policiesStop AWS AI services storing or using your content to improve them
Match the pairs

Organisation policy types

Exam skills 6.1.3

Match each Organizations policy type with what it does.

Log in to try this activity Interactive activities are free with an account.

Declarative policies or SCPs

Declarative policies enforce a desired configuration of a service, such as blocking public access to EBS snapshots and AMIs or enforcing VPC Block Public Access, across an organisation. SCPs can achieve similar results by denying the API calls that would change the configuration, but the two mechanisms work differently and have different strengths. The following list describes the differences.

  • An SCP denies specific API actions; a new API that achieves the same result may not be covered.
  • A declarative policy sets the service's own configuration, so it stays effective as new APIs launch.
  • Declarative policies can show a custom error message that tells users why an action failed.

The following diagram compares the SCP with the declarative policy.

Why a declarative policy is more durable than an SCP for public images. The SCP denies one API, so a future API could make images public another way. The declarative policy sets the EC2 image and snapshot block public access state itself, in every account and Region, whatever APIs are added, with a custom message.
BPA stands for block public access.
Sort into groups

Declarative policy or SCP?

Exam skills 6.1.3

Decide which mechanism each statement describes.

Log in to try this activity Interactive activities are free with an account.

Inheritance

Management policies such as tag and backup policies use inheritance operators, so a parent OU can set values that children may or may not override. Effective policies can be viewed per account to confirm what actually applies.

Worked example

Blocking public AMIs durably

An SCP denies ec2:ModifyImageAttribute with public launch permissions, but the security team worries that a future API could make images public another way. A declarative policy sets the EC2 image block-public-access state itself:

{
  "ec2_attributes": {
    "image_block_public_access": { "state": { "@@assign": "block_new_sharing" } },
    "snapshot_block_public_access": { "state": { "@@assign": "block_all_sharing" } },
    "exception_message": { "@@assign": "Public sharing is blocked by organisation policy. Contact security." }
  }
}

Attached at the root, the policy applies to every account and Region, cannot be changed by account administrators, and stays effective whatever APIs are added. The custom message tells users why their action failed.

Check yourself

How can the organisation opt out of AI services using its data?

Show answer

With an AI services opt-out policy.

Exam Tips

Remember for the exam

  • To enforce "no public sharing of AMIs or snapshots" durably, use a declarative policy.
  • To opt the organisation out of AI services using its data, use an AI services opt-out policy.
  • To standardise tag keys and values across the organisation, use tag policies.
  • To deploy backup plans to every account, use backup policies.
  • Declarative policies stay effective as new APIs launch.