ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept

Troubleshooting ML security issues

Work out whether a failure is a permission or a network path, then read the error and the CloudTrail event.

Request fails
CloudTrail event
Explicit deny: SCP or bucket policy
No allow: role policy or PassRole
KMS message: key policy
denyno allowkms
The CloudTrail message points to the policy type.
  • AccessDenied on CreateTrainingJob

    Likely cause
    Missing PassRole
    Check
    Caller policy
  • Denied reading encrypted data

    Likely cause
    Key policy or role lacks KMS rights
    Check
    KMS key policy
  • Image pull times out

    Likely cause
    No ECR or S3 endpoint, no NAT
    Check
    VPC endpoints
  • Bedrock call times out

    Likely cause
    No interface endpoint or route
    Check
    Endpoints, Flow Logs
  • Job cannot call any API

    Likely cause
    Network isolation on
    Check
    Job settings
Symptom, cause and the first thing to check.

1 / 2

  • AccessDenied on CreateTrainingJob

    Likely cause
    Missing PassRole
    Check
    Caller policy
  • Denied reading encrypted data

    Likely cause
    Key policy or role lacks KMS rights
    Check
    KMS key policy
  • Image pull times out

    Likely cause
    No ECR or S3 endpoint, no NAT
    Check
    VPC endpoints

2 / 2

  • Bedrock call times out

    Likely cause
    No interface endpoint or route
    Check
    Endpoints, Flow Logs
  • Job cannot call any API

    Likely cause
    Network isolation on
    Check
    Job settings
Symptom, cause and the first thing to check.

What it is

AccessDenied has several causes. The role lacks the action or resource in its identity policy. The caller lacks iam:PassRole for the execution role. The data is encrypted with a KMS key that the role or key policy does not allow, which looks like a denied S3 read although the bucket policy is fine. A bucket policy denies the request, for example because it requires a VPC endpoint or HTTPS. An SCP, a permissions boundary or a session policy denies it. Or the trust policy does not let the service assume the role. Newer error messages say which kind it was.

What it is

Network failures are timeouts, not denials. A training job, endpoint or Studio app in a private subnet with no NAT gateway cannot reach S3, ECR or CloudWatch Logs without VPC endpoints: a gateway endpoint for S3, interface endpoints for ECR (the API and the Docker registry) and for logs. A missing Bedrock interface endpoint makes Bedrock calls time out. Security groups must allow outbound HTTPS from the job and inbound HTTPS to the endpoint. A job with network isolation has no network at all, by design, so code that calls an API fails.

What it is

Trace in this order. Read the error text. Find the failed call in CloudTrail and read its errorCode and errorMessage. Test the policy with the IAM policy simulator. Run IAM Access Analyzer policy validation, or generate a policy from real activity. For network paths, check VPC Flow Logs for REJECT records and VPC Reachability Analyzer.

Remember

  • Timeouts mean network. Denials mean permissions.
  • No NAT in a private subnet: S3, ECR and logs need VPC endpoints.
  • Tools: CloudTrail, policy simulator, Access Analyzer, Flow Logs.

On the exam

  • “Job in a private subnet cannot pull the image” points to missing ECR and S3 VPC endpoints.
  • “S3 read fails although the bucket policy allows it” points to the KMS key permissions.
  • “Training call fails with iam:PassRole” points to PassRole on the execution role.
  • “Which policy denied this request?” points to the CloudTrail error message and the policy simulator.