Region Restriction
Policy Description
What this SCP does
This Service Control Policy (SCP) denies all operations outside of specified AWS regions, helping enforce geographic data boundaries and regulatory compliance. This is essential for organizations with data residency requirements.
The policy allows operations only in us-east-1 (N. Virginia) and eu-west-1 (Ireland), while denying access to all other AWS regions. This helps organizations maintain control over where their data is stored and processed.
Validation Strategy
How to test this SCP works
To validate this SCP, attempt to perform AWS operations in both allowed and disallowed regions.
- Valid test: Create an EC2 instance in us-east-1 (should succeed)
- Valid test: Create an S3 bucket in eu-west-1 (should succeed)
- Invalid test: Try to launch an EC2 instance in ap-southeast-1 (should be denied)
- Invalid test: Attempt to create an RDS database in us-west-2 (should be denied)
This testing approach verifies that operations are only allowed in the specified regions (us-east-1 and eu-west-1) while being denied in all other regions.
SCP Policy & Validation Scenarios
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"us-east-1",
"eu-west-1"
]
}
}
}
]
}