Security & Compliance
NIS2: the technical controls a customer will demand from its cloud subcontractor
You are not in NIS2 scope but your customers are. Article 21 measures translated into AWS controls, with an SCP, Terraform and an evidence-collection script.
The pattern is now common: an SMB SaaS vendor or IT services firm receives a contract amendment or a security questionnaire from a customer that is an “essential” or “important” entity, with a NIS2 mention. The vendor is not in scope of the directive, but it sits in the customer’s supply chain, and the customer will have to answer for it.
Where transposition stands (and why it doesn’t reduce the urgency)
Directive (EU) 2022/2555 has been in force since 2023. In France, the “résilience” bill passed the Senate on 12 March 2025, was approved in a special committee of the National Assembly in September 2025, then stalled before being scheduled for a floor debate from 7 October 2026, according to Next.ink. The law is therefore not definitively adopted as of this article. On 17 March 2026, ANSSI published the Référentiel Cyber France (ReCyF): 15 security objectives common to important and essential entities, plus 5 for essential ones, including secure configuration, administration from dedicated resources and monitoring. It is presented as provisional until the texts are final.
For a subcontractor, the obligation comes from the contract, not the law. Article 21(2)(d) of the directive requires entities to manage supply-chain security, including relationships with direct suppliers. In practice, your customers will push requirements down to you whether you are ready or not. Better to get ahead of it.
Threat → control: the mapping that actually gets used
Article 21(2) lists ten families of measures. For a vendor hosted on AWS, these are the ones that show up in questionnaires, with the attack they address and the expected evidence.
| Measure (art. 21(2)) | Typical threat | AWS control | Evidence |
|---|---|---|---|
| (g) Hygiene and training | Account compromised by phishing | MFA for all humans, IAM Identity Center, no long-lived IAM user keys | Credential report, SSO assignment export |
| (i) Access control, asset management | Privilege escalation, orphaned account | Least privilege, quarterly review, SCPs | IAM Access Analyzer report, review tickets |
| (h) Cryptography | Data readable after snapshot theft | Default encryption for EBS, S3, RDS, KMS | get-ebs-encryption-by-default, Config rules |
| (b)(c) Incident handling and continuity | Ransomware, backup deletion | Cross-account backups, Object Lock, tested restores | Restore test report |
| (f) Effectiveness assessment | Control set once then drifted | Config / Security Hub continuously | Findings export with trend |
| (e) Acquisition security and vulnerabilities | Unpatched CVE on host or image | Inspector, patch SLAs | Report with remediation times |
| (d) Supply chain | Compromised dependency or pipeline | Action pinning, SBOM, OIDC | CI workflow, SBOM |
Detection (monitoring, logging) cuts across all of these: without an organization-wide CloudTrail, none of the other rows can be demonstrated. It is also the first thing auditors check.
Artefact 1: organization-level guardrails (SCP)
An SCP makes controls impossible for an account administrator to bypass. This one blocks use of the root user and disabling of detection. Note that SCPs do not apply to the management account, and denying root assumes you have a tested emergency procedure, otherwise you lock yourself out.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyRootUser",
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringLike": { "aws:PrincipalArn": "arn:aws:iam::*:root" }
}
},
{
"Sid": "ProtectDetection",
"Effect": "Deny",
"Action": [
"cloudtrail:StopLogging",
"cloudtrail:DeleteTrail",
"guardduty:DeleteDetector",
"guardduty:DisassociateFromMasterAccount",
"config:StopConfigurationRecorder",
"config:DeleteConfigurationRecorder"
],
"Resource": "*"
}
]
}
Artefact 2: baseline configuration in Terraform
Three account-level settings that can be justified in one line to an auditor: default EBS encryption, account-wide S3 public access block, and a password policy for any remaining IAM users.
resource "aws_ebs_encryption_by_default" "this" {
enabled = true
}
resource "aws_s3_account_public_access_block" "this" {
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
resource "aws_iam_account_password_policy" "this" {
minimum_password_length = 14
require_symbols = true
require_numbers = true
password_reuse_prevention = 24
max_password_age = 0
allow_users_to_change_password = true
}
Default EBS encryption is regional: repeat the resource for each region in use (provider alias).
Artefact 3: evidence-collection script
Evidence is what can be replayed. This script produces dated files to attach to the dossier; run it quarterly from a read-only role (SecurityAudit).
#!/usr/bin/env bash
set -euo pipefail
OUT="evidence-$(date +%F)"; REGION="${AWS_REGION:-eu-west-3}"
mkdir -p "$OUT"
ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
aws iam get-account-summary --query 'SummaryMap.AccountMFAEnabled' > "$OUT/root-mfa.json"
aws iam generate-credential-report >/dev/null
sleep 5
aws iam get-credential-report --query Content --output text | base64 -d > "$OUT/credential-report.csv"
aws s3control get-public-access-block --account-id "$ACCOUNT" > "$OUT/s3-public-access.json"
aws ec2 get-ebs-encryption-by-default --region "$REGION" > "$OUT/ebs-encryption.json"
aws rds describe-db-instances --region "$REGION" \
--query 'DBInstances[?StorageEncrypted==`false`].DBInstanceIdentifier' > "$OUT/rds-unencrypted.json"
aws cloudtrail describe-trails \
--query 'trailList[].{Name:Name,Org:IsOrganizationTrail,MultiRegion:IsMultiRegionTrail,Validation:LogFileValidationEnabled}' \
> "$OUT/cloudtrail.json"
aws guardduty list-detectors --region "$REGION" > "$OUT/guardduty.json"
aws backup list-backup-vaults --region "$REGION" \
--query 'BackupVaultList[].{Name:BackupVaultName,Lock:Locked}' > "$OUT/backup-vaults.json"
In credential-report.csv, look for rows with password_enabled=true and mfa_active=false, and access keys whose access_key_1_last_rotated exceeds your threshold. Those are an auditor’s first two questions.
Proof: what you hand to the customer
A short dossier beats a long one. Aim for 6 to 8 items: the mapping above with the last verification date, the script outputs, the applied SCP (export of the target OU), the vulnerability management policy with its deadlines, the latest restore test report, and the incident notification procedure towards the customer. That last one is often forgotten: Article 23 of the directive requires entities to send an early warning within 24 hours, and they will want to know how fast you notify them.
This dossier is reusable as-is for a SOC 2 or ISO 27001 questionnaire, which is the best return on the exercise.
Conclusion
Facing a NIS2 request from a customer, the right answer is not a certification but an honest mapping, controls that cannot be bypassed and replayable evidence. If you want to know where you stand before the next request, the Cloud Security Audit produces exactly this dossier.
Sources: Directive (EU) 2022/2555 (NIS2), ANSSI — NIS 2 directive and ReCyF, Next.ink — transposition at the National Assembly, AWS — Service control policies, AWS — Credential report.
Found this useful? Share it.
Go further
A topic, a project, a question?
Distribuée supports demanding SMBs on cloud security, CI/CD supply chain and AI security.
Book 15 min