Restrict CodeConnections Provider and HA Regions
Short answer
ADE Deny non-specified Git providers via SCP, create CodeConnections in each Region for HA, and use repository links for CloudFormation Git sync.
Question
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.)
Key Takeaways
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.
Common mistake: 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).
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
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/git-sync.html
This link opens the official vendor documentation in a new tab.
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.
Discussion 8 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 8
-
4145ad0 👍 4this is the answer
-
siloft 👍 3A - SCP deny policy ensures only the specified Git provider can be used (strongest enforcement) D - Regional connections in each operating Region provide high availability (if one Region fails, others continue working independently) E - Repository links enable CloudFormation stacks to sync directly from Git repositories (direct integration as required)
-
052cedf 👍 2A → Enforce Git provider restriction Use SCP in AWS Organizations Deny all except specified provider D → Multi-region high availability Create CodeConnections per Region Ensures resilience Using: AWS CodeConnections F → Deployment pipeline AWS CodePipeline Git → CloudFormation deployment
-
GiorgioGss 👍 1Step 1: Restrict access to the Git provider To ensure staff cannot create connections to any other Git provider, we need an SCP that denies connections to any provider other than the specified one. ✅ Option A ✅ Step 2: Allow connections to the specified provider We also need to explicitly allow creating connections for the specified provider. ✅ Option B ✅ Step 3: Create the connections in a highly available way CodeConnections connections are regional resources. To make deployments highly available across Regions, you must create a connection in each Region where deployments occur. ✅ Option D ✅
-
ryuhei 👍 1Correct choices: A, C, F If you need further clarification or examples (e.g., CodePipeline configuration or CloudFormation StackSets setup), please let me know!
Show 3 more comments
-
danish1234 👍 1ADF make sense since we want region availbility
-
ryuhei 👍 1Grok answer
-
4145ad0 👍 1B is wrong.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →