Network Manager Core Network Auditor
Mindset
One-line takeaway: the verdict is always the worst finding across
all dimensions, and a detached attachment is a live outage — not a
configuration risk but active traffic disruption happening right now.
Cloud WAN core networks are the global backbone layer above Transit
Gateway. Three behaviors make them dangerous when misconfigured:
- AttachmentStatus vs State —
State: AVAILABLE means the resource
exists; AttachmentStatus: DETACHED means traffic does not flow. Most
operators only check State.
- CIDR overlap is not validated — Cloud WAN silently accepts
overlapping CIDRs across attachments. The overlap manifests as
ambiguous routing with no error, no warning.
- LATEST policy is not LIVE policy — a committed-but-not-deployed
policy change means the running network may not match what you audited.
Quick reference — verdict thresholds
| Condition |
Verdict |
Step |
Any attachment AttachmentStatus: DETACHED or REJECTED |
DETACHED_ATTACHMENT |
Step 1 |
| CIDR ranges of two+ attachments overlap |
CIDR_OVERLAP |
Step 2 |
Principal: "*" + networkmanager:* on resource policy, no condition |
PERMISSIVE_POLICY |
Step 3 |
| Cross-account principal on resource policy, no condition |
PERMISSIVE_POLICY |
Step 3 |
Segment share-with includes segments it should isolate from |
PERMISSIVE_POLICY |
Step 4 |
require-acceptance: false on cross-account-eligible segment |
PERMISSIVE_POLICY |
Step 4 |
NFG send-via/receive-from includes both sides of an isolated segment pair |
PERMISSIVE_POLICY |
Step 4 |
LATEST policy generation != LIVE generation |
CONFIG_GAP |
Step 5 |
| Attachment assigned to nonexistent segment |
CONFIG_GAP |
Step 5 |
| Attachment count >= 95 of 100-quota on core network |
CONFIG_GAP |
Step 5 |
| All ATTACHED, no overlap, same-account policy, isolated segments, LIVE=LATEST |
OK |
Step 6 |
Pre-flight: core network metadata gate
Before evaluating the core network config, classify the core network itself.
| Attribute |
Value |
Effect on audit |
State |
CREATING / UPDATING |
Core network is mid-change — policy may be in flux. Note but do not block audit. |
State |
AVAILABLE |
Proceed with full audit. |
State |
DELETING |
Core network being torn down. Flag as operational finding. |
OwnerAccountId |
Caller account |
Proceed. |
OwnerAccountId |
Different account |
Shared core network — resource policy is the cross-account gate. Do NOT skip it. |
If the core network policy JSON is malformed (invalid JSON, missing
core-network-configuration, missing segments), output:
CORE_NETWORK: <core-network-id>
VERDICT: ERROR
REASON: Core network policy document is not valid JSON or is missing required fields — cannot classify.
REMEDIATION: Retrieve the canonical policy with `aws networkmanager get-core-network-policy --core-network-id <id> --policy-version LIVE --output json` and re-audit.
Partially malformed config: If the policy JSON parses but individual
attachments are missing required fields (AttachmentStatus, Cidrs,
Segment), classify each valid attachment normally and emit an ERROR
note per malformed one: "Attachment N is malformed (missing
AttachmentStatus) — skipped." Do NOT abort the entire audit when one
attachment is broken — the valid attachments may still produce a
DETACHED_ATTACHMENT finding.
Multi-network sweep note (pagination): aws networkmanager list-core-networks returns at most 50 per page. Use --starting-token
to page through all networks. For each, also page list-attachments
(caps at 100/page). Always drain NextToken to completion — the last
page is where stale and detached attachments hide.
Process — Classification logic (apply in order, aggregate worst)
Step 0: Expert knowledge — non-obvious Network Manager behaviors
→ Full Step-0 expert knowledge moved verbatim to references/advanced-patterns.md.
Step 1: Attachment status evaluation (DETACHED_ATTACHMENT)
For each attachment, check AttachmentStatus:
DETACHED → DETACHED_ATTACHMENT. The attachment was removed
from the core network via policy but the resource still exists.
Traffic is broken RIGHT NOW for all resources in the attached VPC.
This is an active outage, not a risk — the finding takes precedence
over every other dimension because production workloads may be down.
REJECTED → DETACHED_ATTACHMENT. The attachment was explicitly
rejected (requires-acceptance was true and the core network owner
declined). Traffic never connected. If the rejection was
unintentional, the VPC's workloads are stranded.
PENDING_ATTACHMENT_ACCEPTANCE → note as CONFIG_GAP finding (not
DETACHED). The attachment is waiting for acceptance — traffic is not
flowing, but this is expected when require-acceptance: true.
An attachment with AttachmentStatus: ATTACHED and State: AVAILABLE
passes this step. Note: State: AVAILABLE alone is insufficient — it
means the resource is healthy, not that it is connected.
Step 2: CIDR overlap detection (CIDR_OVERLAP)
Collect all CIDR blocks from all attachments. For each pair of CIDRs
from DIFFERENT attachments, apply the overlap algorithm:
Overlap detection algorithm (concrete): For two CIDRs A/B and C/D
(where B and D are prefix lengths), convert each to a numeric range:
- Compute the network address by zeroing host bits:
net = ip & mask
where mask = (0xFFFFFFFF << (32 - prefix)) & 0xFFFFFFFF.
- Compute the broadcast address:
bcast = net | ~mask.
- CIDRs overlap if
A.net <= C.bcast AND C.net <= A.bcast (range
intersection test). This catches full containment (the common case:
10.0.0.0/16 contains 10.0.1.0/24) and partial overlap
(10.0.0.0/23 overlaps 10.0.1.0/24).
- Identical CIDRs (
10.0.1.0/24 and 10.0.1.0/24) always overlap —
flag even within the same segment.
Example: 10.0.0.0/16 (range 10.0.0.0 - 10.0.255.255) vs
10.0.1.0/24 (range 10.0.1.0 - 10.0.1.255). Since 10.0.0.0 <=
10.0.1.255 AND 10.0.1.0 <= 10.0.255.255, they overlap.
- Overlap across segments is the most dangerous — it creates
inter-VPC routing ambiguity that violates segmentation boundaries.
Traffic destined for
10.0.1.5 may route to either segment.
- Overlap within the same segment is still a finding — multiple VPCs
in the same segment advertising overlapping CIDRs cause intra-segment
routing ambiguity.
- Multi-CIDR VPCs: a VPC with
[10.0.0.0/16, 10.1.0.0/16]
advertises BOTH. Check every CIDR from every attachment — the
secondary CIDR may overlap even when the primary does not.
Report the overlapping pair, their attachment IDs, segments, and the
overlapping CIDR range. If no overlaps exist, this step passes.
Step 3: Resource policy evaluation (PERMISSIVE_POLICY)
Examine the resource policy attached to the core network. Classify the
principal scope of each Allow statement:
WILDCARD_PRINCIPAL — Principal: "*" or {"AWS": "*"}. Any AWS
account holder can invoke the listed actions. Combined with
networkmanager:* or CreateAttachment, this is a route-injection
vector. → PERMISSIVE_POLICY.
CROSS_ACCOUNT — Principal ARN's 12-digit account ID differs from
the core network's OwnerAccountId. Without a restrictive condition
(aws:SourceAccount, aws:SourceArn), the external account can
modify attachments. → PERMISSIVE_POLICY.
SAME_ACCOUNT — All principals share the OwnerAccountId. This
includes the root principal
(arn:aws:iam::ACCOUNT:root + networkmanager:*), which is the
normal root-of-trust delegation — do NOT flag it.
A WILDCARD or CROSS_ACCOUNT principal with a STRONG condition
(aws:SourceAccount, aws:SourceArn) narrows exposure — note the
finding as informational but do NOT produce PERMISSIVE_POLICY unless
the condition is absent or WEAK.
Step 4: Segment policy evaluation (PERMISSIVE_POLICY)
Examine the segment-actions in the core network policy:
Open share-with — a segment whose share-with list includes ALL
other segments has no isolation. Example: segment prod with
share-with: ["prod", "non-prod", "shared-services"] shares routes
with every segment. If prod and non-prod should be isolated, this
is a PERMISSIVE_POLICY finding.
Default segment misuse — the built-in default segment shares
routes with all segments by definition. Any attachment assigned to
default has global connectivity. Flag as PERMISSIVE_POLICY if
default is used for anything other than a deliberate catch-all.
require-acceptance false on cross-account-eligible segment — if
any segment allows cross-account attachments (the resource policy
permits it) and require-acceptance is false or absent, external
accounts can auto-inject routes. → PERMISSIVE_POLICY.
Isolation check: for each pair of segments that should be isolated
(e.g., prod vs non-prod), verify NEITHER segment's share-with
list includes the other. If either side shares, isolation is broken.
Network Function Group bypass detection: After the segment
share-with check, enumerate every entry in network-function-groups.
For each NFG, collect its send-via and receive-from member
segments. If an NFG's member set includes both sides of a segment
pair that should be isolated (e.g., prod + non-prod), the NFG
bridges the isolation boundary — emit PERMISSIVE_POLICY with
the finding: "NFG <name> send-via includes <seg-a> and
<seg-b>, bypassing segment isolation." This check is required
because NFG route exchange ignores share-with lists entirely —
an NFG with an overly broad member set silently voids every
isolation rule that passed above.
Step 5: Configuration gap evaluation (CONFIG_GAP)
Check for operational misconfigurations that do not cause immediate
traffic disruption but create risk:
LATEST != LIVE policy generation — the committed policy (LATEST)
differs from the deployed policy (LIVE). Changes are staged but not
in effect. The running network may not match the audited policy. →
CONFIG_GAP. Remediation: ExecuteCoreNetworkChangeSet.
Attachment assigned to nonexistent segment — an attachment's
Segment field references a segment name not defined in the policy's
segments block. The attachment may route unpredictably or be
assigned to the default segment implicitly. → CONFIG_GAP.
Missing edge location on attachment — an attachment without an
assigned EdgeLocation uses auto-selection. AWS may reassign the edge
when new locations come online, causing latency shifts. → CONFIG_GAP
(informational, not blocking).
Attachment count near quota — if the core network has 95+ of its
100-attachment quota in use, new cross-account attachments can fail
silently: they enter PENDING_ATTACHMENT_ACCEPTANCE then drop to
DETACHED on the next edge poll with no explicit quota error. Emit
a CONFIG_GAP finding citing the current count and remaining headroom.
Step 6: Aggregation — worst verdict wins
The final verdict is the maximum severity across all findings, where:
DETACHED_ATTACHMENT > CIDR_OVERLAP > PERMISSIVE_POLICY > CONFIG_GAP > OK
If no findings from any step, the verdict is OK.
Output format (per core network)
CORE_NETWORK: <core-network-id>
VERDICT: DETACHED_ATTACHMENT | PERMISSIVE_POLICY | CIDR_OVERLAP | CONFIG_GAP | OK
REASON: <1-2 sentences citing the worst finding and step>
FINDINGS:
- [DETACHED_ATTACHMENT] <finding description (Step N)>
- [CIDR_OVERLAP] <finding description (Step N)>
- [OK] <dimension that passed>
REMEDIATION: <specific action per finding, or "None required" if OK>
Worked example — detached attachment with CIDR overlap
CORE_NETWORK: core-network-pqr678
VERDICT: DETACHED_ATTACHMENT
REASON: Attachment attachment-hhh888 is in DETACHED status — traffic to
the prod VPC is broken (Step 1). Additionally, CIDRs 10.0.0.0/16 and
10.0.1.0/24 overlap across the prod and non-prod segments (Step 2).
FINDINGS:
- [DETACHED_ATTACHMENT] VPC attachment-hhh888 (vpc-hhh888) is DETACHED
— prod-segment workloads are unreachable (Step 1)
- [CIDR_OVERLAP] attachment-hhh888 CIDR 10.0.0.0/16 overlaps with
attachment-iii999 CIDR 10.0.1.0/24 across prod/non-prod segments
(Step 2)
- [OK] Resource policy is same-account scoped (Step 3)
REMEDIATION:
1. DETACHED_ATTACHMENT — Re-attach attachment-hhh888 via policy:
update the core network policy to include the attachment in the
prod segment, then execute the change set:
aws networkmanager execute-core-network-change-set
--core-network-id core-network-pqr678
2. CIDR_OVERLAP — Re-IP one VPC's overlapping CIDR or restrict
advertisement to non-overlapping subnets. Cloud WAN does not
validate overlaps — you must enforce disjoint CIDR ranges
across attachments manually.
Anti-Patterns — NEVER
NEVER treat AttachmentState: AVAILABLE as proof the attachment is
connected. State tracks lifecycle; AttachmentStatus tracks
connectivity. An attachment can be AVAILABLE and DETACHED
simultaneously. Always check AttachmentStatus: ATTACHED.
NEVER skip CIDR overlap detection. Cloud WAN silently accepts
overlapping CIDRs at attachment creation — there is no API error, no
console warning, no CloudTrail event. The overlap manifests as
ambiguous routing, with traffic silently reaching the wrong VPC.
NEVER assume the "default" segment is isolated. The default segment
shares routes with ALL segments by design. Assigning a production VPC
to default gives it full network connectivity and breaks every
isolation boundary.
NEVER treat the LATEST policy generation as the deployed state. Only
LIVE is in effect. Auditing LATEST when LIVE differs produces a false
picture — the running network may not match the policy text under
review.
NEVER flag a same-account root principal
(arn:aws:iam::ACCOUNT:root + networkmanager:*) as permissive.
This is the standard root-of-trust delegation that enables IAM-based
core network management. Flagging it as a wildcard grant is a false
positive.
NEVER assume segment names imply isolation. A segment named
"isolated" with share-with: ["prod", "non-prod", "isolated"] is
NOT isolated. Route sharing is determined by the share-with list,
not the segment name.
NEVER ignore attachment policy rule ordering. Rules are evaluated in
ascending rule-number order. A broad condition: any rule at
position 1 shadows every subsequent rule — all attachments get
assigned to that segment regardless of intent.
NEVER recommend deleting a core network attachment without verifying
workload dependencies. Attachment deletion stops traffic immediately
for all resources in the attached VPC. Always check which subnets,
EC2 instances, and services depend on the attachment before removing
it.
NEVER assume a multi-CIDR VPC advertises only the primary CIDR. A VPC
with primary 10.0.0.0/16 and secondary 10.1.0.0/16 advertises
BOTH. The secondary CIDR may overlap with another attachment even
when the primary does not.
NEVER treat require-acceptance: false on cross-account segments as
acceptable by default. Without acceptance, any cross-account VPC that
the resource policy allows can auto-attach and inject routes into the
core network immediately — no review, no approval gate.
NEVER assume policy changes are atomic. Core network policy changes
propagate edge-by-edge (5-15 min). During propagation, routing can be
inconsistent across edges. Do not audit a mid-propagation policy and
treat the result as steady state.
Pre-flight safety checks (run before any remediation CLI)
→ Pre-flight safety command gates moved verbatim to references/diagnostic-commands.md.
Remediation guidance
For DETACHED_ATTACHMENT
- Re-attach the VPC by updating the core network policy to include the
attachment in its segment, then execute the change set:
aws networkmanager execute-core-network-change-set --core-network-id <id>
- If the detachment was intentional (VPC decommissioned), delete the
attachment resource to stop accruing cost:
aws networkmanager delete-attachment --attachment-id <id>
- Verify re-attachment:
aws networkmanager get-attachment --attachment-id <id> — confirm
AttachmentStatus: ATTACHED.
For CIDR_OVERLAP
- Identify which CIDR range is causing the overlap and re-IP one VPC to
a disjoint range.
- Alternatively, restrict the attachment's advertised CIDRs to
non-overlapping subnets using the attachment's
SubnetArns list —
advertise only subnets whose CIDRs do not overlap.
- After remediation, verify route tables:
aws networkmanager get-network-routes --core-network-id <id> —
confirm each destination has a unique next-hop attachment.
For PERMISSIVE_POLICY — resource policy
- Remove
Principal: "*" from the resource policy. Replace with the
specific account or role ARN that needs cross-account access.
- Add
aws:SourceAccount or aws:SourceArn conditions to any
cross-account principal.
- Back up the current policy first:
aws networkmanager get-resource-policy --resource-arn <core-network-arn> --output json > /tmp/resource-policy-backup.json.
- Apply the tightened policy:
aws networkmanager put-resource-policy --policy-document file://tightened-policy.json --resource-arn <core-network-arn>.
For PERMISSIVE_POLICY — segment policy
- Remove the offending segment from each over-broad
share-with list.
If prod should not share with non-prod, remove non-prod from
prod's share-with and vice versa.
- Move production attachments out of the
default segment into a named
segment with explicit isolation.
- Set
require-acceptance: true on any segment that accepts
cross-account attachments.
For CONFIG_GAP
- If
LATEST != LIVE, deploy the pending change set:
aws networkmanager execute-core-network-change-set --core-network-id <id>.
- If an attachment references a nonexistent segment, update the policy
to either create the segment or reassign the attachment to a valid
one.
- Assign explicit edge locations to attachments to prevent auto-
reassignment when AWS adds new PoPs.
For OK
- No remediation required for the current posture.
- Recommend enabling CloudWatch alarms for
AttachmentStatusChanges
and CoreNetworkPolicyChange events.
- Verify LATEST equals LIVE after every policy commit.
Recent AWS features (2024-2026)
→ Recent AWS features moved verbatim to references/advanced-patterns.md.
References (load on demand)
- references/advanced-patterns.md — Step-0 expert knowledge, recent AWS features 2024-2026
- references/diagnostic-commands.md — pre-flight safety gates, policy backup, and dependency checks
Domain
AWS CloudOps / Network Manager (Cloud WAN) Core Network Security and Compliance.
AWS documentation
1---2name: networkmanager-core-network-auditor3description: Audits AWS Network Manager (Cloud WAN) core networks for detached attachments, permissive resource and segment policies, CIDR overlap across VPC attachments, and configuration gaps (LATEST vs LIVE policy mismatch, missing edge locations, orphaned segments). Emits a deterministic verdict (DETACHED_ATTACHMENT | PERMISSIVE_POLICY | CIDR_OVERLAP | CONFIG_GAP | OK) per core network with enumerated findings and specific CLI remediation. Use when reviewing Cloud WAN core network policies, checking attachment health, validating CIDR isolation between segments, auditing cross-account resource policies, or hardening core network posture before production deployment.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline policy-document classification. Live-account audits use aws networkmanager get-core-network, get-core-network-policy, list-attachments, and get-resource-policy (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/networkmanager-core-network-auditor8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '2'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Networking15 verdict_shape: DETACHED_ATTACHMENT | PERMISSIVE_POLICY | CIDR_OVERLAP | CONFIG_GAP | OK16 when_to_use: Reviewing a Cloud WAN core network policy before production deployment, checking for detached or rejected attachments, validating CIDR isolation between segments, auditing cross-account resource policies, inspecting segment routing for isolation gaps, or verifying that the LIVE policy matches the LATEST committed policy.17 activation_triggers: audit this core network, check Cloud WAN attachment status, CIDR overlap in core network, segment isolation check, core network resource policy, LATEST vs LIVE policy, detached VPC attachment, core network audit18 invocation_schema: 'Input: either (a) a core network policy document plus attachment list and resource policy JSON, OR (b) a core-network-id for live-account audit. Output: deterministic CORE_NETWORK/VERDICT/REASON/FINDINGS/ REMEDIATION block per core network, where VERDICT is one of DETACHED_ATTACHMENT, PERMISSIVE_POLICY, CIDR_OVERLAP, CONFIG_GAP, OK.'19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 keywords: Network Manager, Cloud WAN, core network, attachment, DETACHED, resource policy, cross-account, CIDR overlap, segment policy, segment isolation, LATEST vs LIVE, policy generation, edge location, network function group, VPC attachment, transit gateway, routing, require-acceptance, core network audit22 tags: networkmanager, cloud-wan, networking, core-network, segment, cidr, attachment, audit23---2425# Network Manager Core Network Auditor2627## Mindset2829**One-line takeaway:** the verdict is always the **worst** finding across30all dimensions, and a detached attachment is a **live outage** — not a31configuration risk but active traffic disruption happening right now.3233Cloud WAN core networks are the global backbone layer above Transit34Gateway. Three behaviors make them dangerous when misconfigured:3536- **AttachmentStatus vs State** — `State: AVAILABLE` means the resource37 exists; `AttachmentStatus: DETACHED` means traffic does not flow. Most38 operators only check State.39- **CIDR overlap is not validated** — Cloud WAN silently accepts40 overlapping CIDRs across attachments. The overlap manifests as41 ambiguous routing with no error, no warning.42- **LATEST policy is not LIVE policy** — a committed-but-not-deployed43 policy change means the running network may not match what you audited.4445## Quick reference — verdict thresholds4647| Condition | Verdict | Step |48|---|---|---|49| Any attachment `AttachmentStatus: DETACHED` or `REJECTED` | **DETACHED_ATTACHMENT** | Step 1 |50| CIDR ranges of two+ attachments overlap | **CIDR_OVERLAP** | Step 2 |51| `Principal: "*"` + `networkmanager:*` on resource policy, no condition | **PERMISSIVE_POLICY** | Step 3 |52| Cross-account principal on resource policy, no condition | **PERMISSIVE_POLICY** | Step 3 |53| Segment `share-with` includes segments it should isolate from | **PERMISSIVE_POLICY** | Step 4 |54| `require-acceptance: false` on cross-account-eligible segment | **PERMISSIVE_POLICY** | Step 4 |55| NFG `send-via`/`receive-from` includes both sides of an isolated segment pair | **PERMISSIVE_POLICY** | Step 4 |56| `LATEST` policy generation != `LIVE` generation | **CONFIG_GAP** | Step 5 |57| Attachment assigned to nonexistent segment | **CONFIG_GAP** | Step 5 |58| Attachment count >= 95 of 100-quota on core network | **CONFIG_GAP** | Step 5 |59| All ATTACHED, no overlap, same-account policy, isolated segments, LIVE=LATEST | **OK** | Step 6 |6061## Pre-flight: core network metadata gate6263Before evaluating the core network config, classify the core network itself.6465| Attribute | Value | Effect on audit |66|---|---|---|67| `State` | `CREATING` / `UPDATING` | Core network is mid-change — policy may be in flux. Note but do not block audit. |68| `State` | `AVAILABLE` | Proceed with full audit. |69| `State` | `DELETING` | Core network being torn down. Flag as operational finding. |70| `OwnerAccountId` | Caller account | Proceed. |71| `OwnerAccountId` | Different account | Shared core network — resource policy is the cross-account gate. Do NOT skip it. |7273**If the core network policy JSON is malformed** (invalid JSON, missing74`core-network-configuration`, missing `segments`), output:7576```text77CORE_NETWORK: <core-network-id>78VERDICT: ERROR79REASON: Core network policy document is not valid JSON or is missing required fields — cannot classify.80REMEDIATION: Retrieve the canonical policy with `aws networkmanager get-core-network-policy --core-network-id <id> --policy-version LIVE --output json` and re-audit.81```8283**Partially malformed config:** If the policy JSON parses but individual84attachments are missing required fields (`AttachmentStatus`, `Cidrs`,85`Segment`), classify each valid attachment normally and emit an ERROR86note per malformed one: "Attachment N is malformed (missing87AttachmentStatus) — skipped." Do NOT abort the entire audit when one88attachment is broken — the valid attachments may still produce a89DETACHED_ATTACHMENT finding.9091**Multi-network sweep note (pagination):** `aws networkmanager92list-core-networks` returns at most 50 per page. Use `--starting-token`93to page through all networks. For each, also page `list-attachments`94(caps at 100/page). Always drain `NextToken` to completion — the last95page is where stale and detached attachments hide.9697## Process — Classification logic (apply in order, aggregate worst)9899### Step 0: Expert knowledge — non-obvious Network Manager behaviors100101→ Full Step-0 expert knowledge moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).102103### Step 1: Attachment status evaluation (DETACHED_ATTACHMENT)104105For each attachment, check `AttachmentStatus`:106107- **DETACHED** → **DETACHED_ATTACHMENT**. The attachment was removed108 from the core network via policy but the resource still exists.109 Traffic is broken RIGHT NOW for all resources in the attached VPC.110 This is an active outage, not a risk — the finding takes precedence111 over every other dimension because production workloads may be down.112113- **REJECTED** → **DETACHED_ATTACHMENT**. The attachment was explicitly114 rejected (requires-acceptance was true and the core network owner115 declined). Traffic never connected. If the rejection was116 unintentional, the VPC's workloads are stranded.117118- **PENDING_ATTACHMENT_ACCEPTANCE** → note as CONFIG_GAP finding (not119 DETACHED). The attachment is waiting for acceptance — traffic is not120 flowing, but this is expected when `require-acceptance: true`.121122An attachment with `AttachmentStatus: ATTACHED` and `State: AVAILABLE`123passes this step. Note: `State: AVAILABLE` alone is insufficient — it124means the resource is healthy, not that it is connected.125126### Step 2: CIDR overlap detection (CIDR_OVERLAP)127128Collect all CIDR blocks from all attachments. For each pair of CIDRs129from DIFFERENT attachments, apply the overlap algorithm:130131**Overlap detection algorithm (concrete):** For two CIDRs A/B and C/D132(where B and D are prefix lengths), convert each to a numeric range:1331. Compute the network address by zeroing host bits: `net = ip & mask`134 where `mask = (0xFFFFFFFF << (32 - prefix)) & 0xFFFFFFFF`.1352. Compute the broadcast address: `bcast = net | ~mask`.1363. CIDRs overlap if `A.net <= C.bcast AND C.net <= A.bcast` (range137 intersection test). This catches full containment (the common case:138 `10.0.0.0/16` contains `10.0.1.0/24`) and partial overlap139 (`10.0.0.0/23` overlaps `10.0.1.0/24`).1404. Identical CIDRs (`10.0.1.0/24` and `10.0.1.0/24`) always overlap —141 flag even within the same segment.142143**Example:** `10.0.0.0/16` (range 10.0.0.0 - 10.0.255.255) vs144`10.0.1.0/24` (range 10.0.1.0 - 10.0.1.255). Since 10.0.0.0 <=14510.0.1.255 AND 10.0.1.0 <= 10.0.255.255, they overlap.146147- Overlap **across segments** is the most dangerous — it creates148 inter-VPC routing ambiguity that violates segmentation boundaries.149 Traffic destined for `10.0.1.5` may route to either segment.150- Overlap **within the same segment** is still a finding — multiple VPCs151 in the same segment advertising overlapping CIDRs cause intra-segment152 routing ambiguity.153- **Multi-CIDR VPCs:** a VPC with `[10.0.0.0/16, 10.1.0.0/16]`154 advertises BOTH. Check every CIDR from every attachment — the155 secondary CIDR may overlap even when the primary does not.156157Report the overlapping pair, their attachment IDs, segments, and the158overlapping CIDR range. If no overlaps exist, this step passes.159160### Step 3: Resource policy evaluation (PERMISSIVE_POLICY)161162Examine the resource policy attached to the core network. Classify the163principal scope of each `Allow` statement:164165- **WILDCARD_PRINCIPAL** — `Principal: "*"` or `{"AWS": "*"}`. Any AWS166 account holder can invoke the listed actions. Combined with167 `networkmanager:*` or `CreateAttachment`, this is a route-injection168 vector. → **PERMISSIVE_POLICY**.169170- **CROSS_ACCOUNT** — Principal ARN's 12-digit account ID differs from171 the core network's `OwnerAccountId`. Without a restrictive condition172 (`aws:SourceAccount`, `aws:SourceArn`), the external account can173 modify attachments. → **PERMISSIVE_POLICY**.174175- **SAME_ACCOUNT** — All principals share the `OwnerAccountId`. This176 includes the root principal177 (`arn:aws:iam::ACCOUNT:root` + `networkmanager:*`), which is the178 **normal root-of-trust delegation** — do NOT flag it.179180A WILDCARD or CROSS_ACCOUNT principal with a STRONG condition181(`aws:SourceAccount`, `aws:SourceArn`) narrows exposure — note the182finding as informational but do NOT produce PERMISSIVE_POLICY unless183the condition is absent or WEAK.184185### Step 4: Segment policy evaluation (PERMISSIVE_POLICY)186187Examine the `segment-actions` in the core network policy:188189- **Open share-with** — a segment whose `share-with` list includes ALL190 other segments has no isolation. Example: segment `prod` with191 `share-with: ["prod", "non-prod", "shared-services"]` shares routes192 with every segment. If `prod` and `non-prod` should be isolated, this193 is a **PERMISSIVE_POLICY** finding.194195- **Default segment misuse** — the built-in `default` segment shares196 routes with all segments by definition. Any attachment assigned to197 `default` has global connectivity. Flag as **PERMISSIVE_POLICY** if198 `default` is used for anything other than a deliberate catch-all.199200- **require-acceptance false on cross-account-eligible segment** — if201 any segment allows cross-account attachments (the resource policy202 permits it) and `require-acceptance` is false or absent, external203 accounts can auto-inject routes. → **PERMISSIVE_POLICY**.204205Isolation check: for each pair of segments that should be isolated206(e.g., `prod` vs `non-prod`), verify NEITHER segment's `share-with`207list includes the other. If either side shares, isolation is broken.208209**Network Function Group bypass detection:** After the segment210share-with check, enumerate every entry in `network-function-groups`.211For each NFG, collect its `send-via` and `receive-from` member212segments. If an NFG's member set includes both sides of a segment213pair that should be isolated (e.g., `prod` + `non-prod`), the NFG214bridges the isolation boundary — emit **PERMISSIVE_POLICY** with215the finding: "NFG `<name>` send-via includes `<seg-a>` and216`<seg-b>`, bypassing segment isolation." This check is required217because NFG route exchange ignores `share-with` lists entirely —218an NFG with an overly broad member set silently voids every219isolation rule that passed above.220221### Step 5: Configuration gap evaluation (CONFIG_GAP)222223Check for operational misconfigurations that do not cause immediate224traffic disruption but create risk:225226- **LATEST != LIVE policy generation** — the committed policy (`LATEST`)227 differs from the deployed policy (`LIVE`). Changes are staged but not228 in effect. The running network may not match the audited policy. →229 **CONFIG_GAP**. Remediation: `ExecuteCoreNetworkChangeSet`.230231- **Attachment assigned to nonexistent segment** — an attachment's232 `Segment` field references a segment name not defined in the policy's233 `segments` block. The attachment may route unpredictably or be234 assigned to the default segment implicitly. → **CONFIG_GAP**.235236- **Missing edge location on attachment** — an attachment without an237 assigned `EdgeLocation` uses auto-selection. AWS may reassign the edge238 when new locations come online, causing latency shifts. → **CONFIG_GAP**239 (informational, not blocking).240241- **Attachment count near quota** — if the core network has 95+ of its242 100-attachment quota in use, new cross-account attachments can fail243 silently: they enter `PENDING_ATTACHMENT_ACCEPTANCE` then drop to244 `DETACHED` on the next edge poll with no explicit quota error. Emit245 a **CONFIG_GAP** finding citing the current count and remaining headroom.246247### Step 6: Aggregation — worst verdict wins248249The final verdict is the **maximum severity** across all findings, where:250251```text252DETACHED_ATTACHMENT > CIDR_OVERLAP > PERMISSIVE_POLICY > CONFIG_GAP > OK253```254255If no findings from any step, the verdict is **OK**.256257## Output format (per core network)258259```text260CORE_NETWORK: <core-network-id>261VERDICT: DETACHED_ATTACHMENT | PERMISSIVE_POLICY | CIDR_OVERLAP | CONFIG_GAP | OK262REASON: <1-2 sentences citing the worst finding and step>263FINDINGS:264 - [DETACHED_ATTACHMENT] <finding description (Step N)>265 - [CIDR_OVERLAP] <finding description (Step N)>266 - [OK] <dimension that passed>267REMEDIATION: <specific action per finding, or "None required" if OK>268```269270### Worked example — detached attachment with CIDR overlap271272```text273CORE_NETWORK: core-network-pqr678274VERDICT: DETACHED_ATTACHMENT275REASON: Attachment attachment-hhh888 is in DETACHED status — traffic to276the prod VPC is broken (Step 1). Additionally, CIDRs 10.0.0.0/16 and27710.0.1.0/24 overlap across the prod and non-prod segments (Step 2).278FINDINGS:279 - [DETACHED_ATTACHMENT] VPC attachment-hhh888 (vpc-hhh888) is DETACHED280 — prod-segment workloads are unreachable (Step 1)281 - [CIDR_OVERLAP] attachment-hhh888 CIDR 10.0.0.0/16 overlaps with282 attachment-iii999 CIDR 10.0.1.0/24 across prod/non-prod segments283 (Step 2)284 - [OK] Resource policy is same-account scoped (Step 3)285REMEDIATION:286 1. DETACHED_ATTACHMENT — Re-attach attachment-hhh888 via policy:287 update the core network policy to include the attachment in the288 prod segment, then execute the change set:289 aws networkmanager execute-core-network-change-set290 --core-network-id core-network-pqr678291 2. CIDR_OVERLAP — Re-IP one VPC's overlapping CIDR or restrict292 advertisement to non-overlapping subnets. Cloud WAN does not293 validate overlaps — you must enforce disjoint CIDR ranges294 across attachments manually.295```296297## Anti-Patterns — NEVER298299- NEVER treat `AttachmentState: AVAILABLE` as proof the attachment is300 connected. `State` tracks lifecycle; `AttachmentStatus` tracks301 connectivity. An attachment can be `AVAILABLE` and `DETACHED`302 simultaneously. Always check `AttachmentStatus: ATTACHED`.303304- NEVER skip CIDR overlap detection. Cloud WAN silently accepts305 overlapping CIDRs at attachment creation — there is no API error, no306 console warning, no CloudTrail event. The overlap manifests as307 ambiguous routing, with traffic silently reaching the wrong VPC.308309- NEVER assume the "default" segment is isolated. The default segment310 shares routes with ALL segments by design. Assigning a production VPC311 to `default` gives it full network connectivity and breaks every312 isolation boundary.313314- NEVER treat the LATEST policy generation as the deployed state. Only315 LIVE is in effect. Auditing LATEST when LIVE differs produces a false316 picture — the running network may not match the policy text under317 review.318319- NEVER flag a same-account root principal320 (`arn:aws:iam::ACCOUNT:root` + `networkmanager:*`) as permissive.321 This is the standard root-of-trust delegation that enables IAM-based322 core network management. Flagging it as a wildcard grant is a false323 positive.324325- NEVER assume segment names imply isolation. A segment named326 "isolated" with `share-with: ["prod", "non-prod", "isolated"]` is327 NOT isolated. Route sharing is determined by the `share-with` list,328 not the segment name.329330- NEVER ignore attachment policy rule ordering. Rules are evaluated in331 ascending `rule-number` order. A broad `condition: any` rule at332 position 1 shadows every subsequent rule — all attachments get333 assigned to that segment regardless of intent.334335- NEVER recommend deleting a core network attachment without verifying336 workload dependencies. Attachment deletion stops traffic immediately337 for all resources in the attached VPC. Always check which subnets,338 EC2 instances, and services depend on the attachment before removing339 it.340341- NEVER assume a multi-CIDR VPC advertises only the primary CIDR. A VPC342 with primary `10.0.0.0/16` and secondary `10.1.0.0/16` advertises343 BOTH. The secondary CIDR may overlap with another attachment even344 when the primary does not.345346- NEVER treat `require-acceptance: false` on cross-account segments as347 acceptable by default. Without acceptance, any cross-account VPC that348 the resource policy allows can auto-attach and inject routes into the349 core network immediately — no review, no approval gate.350351- NEVER assume policy changes are atomic. Core network policy changes352 propagate edge-by-edge (5-15 min). During propagation, routing can be353 inconsistent across edges. Do not audit a mid-propagation policy and354 treat the result as steady state.355356## Pre-flight safety checks (run before any remediation CLI)357358→ Pre-flight safety command gates moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md).359360## Remediation guidance361362### For DETACHED_ATTACHMENT3633641. Re-attach the VPC by updating the core network policy to include the365 attachment in its segment, then execute the change set:366 `aws networkmanager execute-core-network-change-set --core-network-id <id>`3672. If the detachment was intentional (VPC decommissioned), delete the368 attachment resource to stop accruing cost:369 `aws networkmanager delete-attachment --attachment-id <id>`3703. Verify re-attachment:371 `aws networkmanager get-attachment --attachment-id <id>` — confirm372 `AttachmentStatus: ATTACHED`.373374### For CIDR_OVERLAP3753761. Identify which CIDR range is causing the overlap and re-IP one VPC to377 a disjoint range.3782. Alternatively, restrict the attachment's advertised CIDRs to379 non-overlapping subnets using the attachment's `SubnetArns` list —380 advertise only subnets whose CIDRs do not overlap.3813. After remediation, verify route tables:382 `aws networkmanager get-network-routes --core-network-id <id>` —383 confirm each destination has a unique next-hop attachment.384385### For PERMISSIVE_POLICY — resource policy3863871. Remove `Principal: "*"` from the resource policy. Replace with the388 specific account or role ARN that needs cross-account access.3892. Add `aws:SourceAccount` or `aws:SourceArn` conditions to any390 cross-account principal.3913. Back up the current policy first:392 `aws networkmanager get-resource-policy --resource-arn <core-network-arn> --output json > /tmp/resource-policy-backup.json`.3934. Apply the tightened policy:394 `aws networkmanager put-resource-policy --policy-document file://tightened-policy.json --resource-arn <core-network-arn>`.395396### For PERMISSIVE_POLICY — segment policy3973981. Remove the offending segment from each over-broad `share-with` list.399 If `prod` should not share with `non-prod`, remove `non-prod` from400 `prod`'s share-with and vice versa.4012. Move production attachments out of the `default` segment into a named402 segment with explicit isolation.4033. Set `require-acceptance: true` on any segment that accepts404 cross-account attachments.405406### For CONFIG_GAP4074081. If `LATEST != LIVE`, deploy the pending change set:409 `aws networkmanager execute-core-network-change-set --core-network-id <id>`.4102. If an attachment references a nonexistent segment, update the policy411 to either create the segment or reassign the attachment to a valid412 one.4133. Assign explicit edge locations to attachments to prevent auto-414 reassignment when AWS adds new PoPs.415416### For OK4174181. No remediation required for the current posture.4192. Recommend enabling CloudWatch alarms for `AttachmentStatusChanges`420 and `CoreNetworkPolicyChange` events.4213. Verify LATEST equals LIVE after every policy commit.422423## Recent AWS features (2024-2026)424425→ Recent AWS features moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md).426427## References (load on demand)428429- [references/advanced-patterns.md](references/advanced-patterns.md) — Step-0 expert knowledge, recent AWS features 2024-2026430- [references/diagnostic-commands.md](references/diagnostic-commands.md) — pre-flight safety gates, policy backup, and dependency checks431432## Domain433434AWS CloudOps / Network Manager (Cloud WAN) Core Network Security and Compliance.435436## AWS documentation437438- **AWS Network Manager User Guide** — https://docs.aws.amazon.com/network-manager/latest/cloudwan-guide/what-is-cloudwan.html439- **Cloud WAN Security** — https://docs.aws.amazon.com/network-manager/latest/cloudwan-guide/security-cloudwan.html440- **Network Manager API Reference** — https://docs.aws.amazon.com/networkmanager/latest/APIReference/441- **AWS CLI Command Reference (networkmanager)** — https://docs.aws.amazon.com/cli/latest/reference/networkmanager/442- **Core network policies** — https://docs.aws.amazon.com/network-manager/latest/cloudwan-guide/cloudwan-policies.html