Restrict CodeConnections Provider and HA Regions
A company uses AWS Organizations to manage multiple AWS accounts. The accounts are in an OU that has a policy attached to allow all actions. The company is migrating several Git repositories to a specified AWS CodeConnections supported Git provider. The Git repositories manage AWS CloudFormation stacks for application infrastructure that the company deploys across multiple AWS Regions. The company wants a DevOps team to integrate CodeConnections into the CloudFormation stacks. The DevOps team must ensure that company staff members can integrate only with the specified Git provider. The deployment process must be highly available across Regions. Which combination of steps will meet these requirements? (Choose three.)
Community Insight
The question tests restricting AWS CodeConnections via SCPs and achieving cross-Region high availability using regional connections and CloudFormation repository links.
This guide explains how to restrict AWS CodeConnections to a specific Git provider using SCPs and ensure high availability across Regions by creating regional connections and using CloudFormation Git sync.
Choosing a single CodeConnections connection (Option C) instead of per-Region connections (Option D) for high availability, or using an Allow SCP (Option B) instead of a Deny SCP (Option A).
Community Discussion (8 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option A correctly uses an SCP Deny statement with a condition that blocks any CodeConnections creation where the provider type is not the specified Git provider, effectively restricting access to only the allowed provider. Option D ensures high availability across Regions by creating a CodeConnections connection in each Region where the company operates, mitigating the risk of a single point of failure if a Region goes down. Option E leverages the CloudFormation Git sync feature by creating a CodeConnections repository link and updating the stacks to sync directly from the Git repository, fulfilling the requirement to integrate CodeConnections into the CloudFormation stacks.Why the Other Options Are Wrong
Option B is incorrect because an Allow SCP does not restrict actions; since the OU already allows all actions, adding an Allow statement does nothing to prevent connections to other Git providers. Option C is incorrect because a single CodeConnections connection is a regional resource and creates a single point of failure, violating the high-availability requirement across Regions. Option F is incorrect because creating a CodePipeline introduces an orchestration layer rather than integrating CodeConnections directly into the CloudFormation stacks via native Git sync, which is what the question explicitly requires.Community Comment Notes
Community members debated between using CodePipeline versus CloudFormation Git sync, with one user noting that "repository links enable CloudFormation stacks to sync directly from Git repositories" which aligns with Option E. Another user incorrectly favored Option F to create a pipeline, misunderstanding the requirement to integrate directly into the stacks. There was also confusion on SCPs, with some incorrectly assuming both Allow and Deny statements are needed, though as one commenter pointed out, "B is wrong" because Allow SCPs do not restrict access.Official Reference
Exam Strategy
For high availability of regional services like CodeConnections, always provision the resource in every operating Region rather than relying on a single Region. To restrict a specific action or resource type in AWS Organizations when an Allow policy already exists, use a Deny SCP with a StringNotEquals condition.
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →