More Info:
Bedrock model customization job should have active security groupRisk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO/IEC 27018
- ISO/IEC 27701
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- StateRAMP
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Here’s how to remediate this using the AWS Console by locking down (or removing) the security group associated with the Bedrock model customization job.
If you tell me the exact security check/source of the finding (e.g., Security Hub / control ID), I can tailor the remediation more precisely to that control’s requirement.
1. Identify the Security Group Used by the Customization Job
- Sign in to the AWS Management Console and go to Amazon Bedrock.
- In the left navigation pane, choose Model customization (or Custom models → Customization jobs, depending on your console version).
- Click the specific Customization job that triggered the finding.
- In the Networking / VPC configuration section, note the Security group ID(s) associated with the job. Copy those IDs.
Important: You cannot change the VPC/security group on an already-running or completed customization job. You will secure the SG itself and adjust settings for future jobs.
2. Tighten the Security Group Rules
- In the console, go to EC2.
- In the left pane, choose Security Groups.
- Search for the Security group ID you copied, then select it.
2.1 Restrict Inbound Rules
- Go to the Inbound rules tab, then choose Edit inbound rules.
- Remove any rules that:
- Allow inbound from
0.0.0.0/0or::/0(especially for SSH, RDP, or any non-required port). - Are broader than needed (e.g., wide CIDR like
/0,/8,/16when not required).
- Allow inbound from
- Only keep rules that are:
- Required for your job (for most Bedrock customization jobs, you often do not need broad inbound access at all).
- Restricted to specific internal CIDR ranges, VPCs, or security groups.
- Choose Save rules.
2.2 Restrict Outbound Rules (if needed)
- Go to the Outbound rules tab → Edit outbound rules.
- Remove or narrow any
0.0.0.0/0or::/0rules unless egress to the public internet is strictly required. - Prefer:
- VPC-only or specific CIDR ranges.
- Specific service endpoints (via VPC endpoints, if applicable).
- Choose Save rules.
3. (Optional) Create a Locked-Down Security Group for Future Jobs
If the existing SG is used by multiple workloads, it’s cleaner to create a dedicated one for Bedrock:- In EC2 → Security Groups, choose Create security group.
- Name it something like
bedrock-customization-sg-restricted. - Attach it to the correct VPC.
- Set:
- Inbound rules: None or only the minimal, tightly scoped rules required.
- Outbound rules: Restricted to what is necessary (VPC-only or specific CIDRs/endpoints).
- Save the security group.
- Go back to Amazon Bedrock → Model customization.
- When you create the next customization job, in the Networking / VPC configuration step, choose this new restricted Security group instead of the older one.
4. (Optional) If You Intended to Delete the Security Group
If you’re getting errors deleting a security group because it is “in use” by a Bedrock customization job:- Confirm the customization job has fully completed or failed (not running).
- Verify the SG isn’t referenced by:
- Other EC2 instances, ENIs, load balancers, Lambda functions, etc.
- Once it’s no longer referenced:
- Go to EC2 → Security Groups, select the SG, and choose Delete security group.
If you tell me the exact security check/source of the finding (e.g., Security Hub / control ID), I can tailor the remediation more precisely to that control’s requirement.
Using CLI
Using CLI
Below are CLI-focused steps to remediate a Bedrock model customization job that uses an insecure/overly-permissive active security group.Assumptions:
Look for the
Inspect
First generate Run Repeat similarly for IPv6 (
Command:
If Bedrock customization uses VPC endpoints, scope egress to those endpoints’ private IP ranges or associated subnets.
Then configure:
If you share:
- You already know (or can identify) the Security Group ID(s) used in the Bedrock customization job’s VPC config.
- The typical misconfiguration is that the SG allows broad access (e.g.,
0.0.0.0/0or::/0) or unnecessary ports/protocols.
1. Identify the Security Group(s) Used
If you already know the Security Group ID (sg-xxxxxxxx), skip to step 2.If not, list security groups and filter by tag/name you used for Bedrock:GroupId fields like sg-0123456789abcdef0.2. Review Current Inbound and Outbound Rules
IpPermissions (inbound) and IpPermissionsEgress (outbound) for:0.0.0.0/0or::/0- Unnecessary ports (e.g., all ports 0–65535, or
IpProtocol: -1)
3. Remove Insecure Inbound Rules
Example: Remove all inbound rules:ingress.json from current rules:revoke-security-group-ingress with that file to clear them.If you only want to remove broad rules (e.g., all traffic from 0.0.0.0/0):- Create a minimal JSON file, e.g.
revoke-0-all.json:
- Revoke just that:
CidrIpv6: "::/0").4. Restrict Outbound Rules (If Required)
If your policy requires restricted egress (not0.0.0.0/0):- Export current egress:
- Revoke overly broad egress, e.g.:
revoke-egress-0-all.json:5. Add Least-Privilege Rules Needed by Bedrock Job
Typically:- No inbound rules are required for many VPC workloads if they only initiate outbound connections.
- Outbound rules should only allow required destinations (e.g., VPC endpoints, specific CIDR ranges or ports).
6. (Optional) Create a New Hardened Security Group and Use It for Future Jobs
Instead of fixing an old SG, you can create a dedicated locked-down one:- No inbound rules (default).
- Minimal egress as in step 5.
vpcConfig.securityGroupIds when starting future Bedrock customization jobs.7. (Optional) Delete Unused Security Groups
After confirming the SG is no longer attached to any ENIs and not referenced in other resources:If you share:
- The current SG rules (JSON from
describe-security-groups), and - Any Bedrock/VPC endpoint patterns you must support,
Using Python
Using Python
For AWS Bedrock, the “Model Customization Job Has Active Security Group” finding usually means the security group associated with the job allows unnecessary inbound access (e.g., 0.0.0.0/0). You can’t update an existing Bedrock customization job, but you can remediate the underlying security group (for running jobs) and fix your configuration for all new jobs.Below are step‑by‑step instructions and Python (boto3) code to lock down the security group(s).
Use the security groups referenced there.
If you only want to remove
If Bedrock customization needs outbound access (for example to S3 via a VPC endpoint), add only those explicit rules (e.g., to VPC endpoint security groups or CIDRs).
Then, when creating new customization jobs, always reference
If you share the exact policy/finding text (e.g., from Security Hub/Config), I can tailor the Python to match that control precisely (e.g., specific ports or CIDRs to remove).
1. Identify the Security Group(s) used by the Bedrock customization job
If you know the security group ID(s) already, you can skip to step 2.Otherwise, when you create a customization job you pass avpcConfig with security group IDs. For reference, a creation call looks like:2. Remove overly permissive inbound rules from the security group
Typical misconfiguration: inbound rules like:- CIDR:
0.0.0.0/0or::/0 - Protocol:
tcpor-1(all) - Ports: wide ranges or all
- No inbound rules at all, or
- Only strictly required internal access (e.g., from specific subnets or security groups).
Python: strip all inbound rules from the SG
0.0.0.0/0 or ::/0 rules and keep internal rules, filter them:3. Lock down outbound rules if required by your policy
Some security baselines also require outbound to be restricted (not0.0.0.0/0 / all protocols).To remove all outbound rules:4. Use a hardened SG for all future Bedrock customization jobs
Create a dedicated, locked‑down SG once, and reuse it:locked_sg_id:If you share the exact policy/finding text (e.g., from Security Hub/Config), I can tailor the Python to match that control precisely (e.g., specific ports or CIDRs to remove).

