Courseiva
Back to AWS Certified AI Practitioner AIF-C01 questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise AWS Certified AI Practitioner AIF-C01 practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
AIF-C01
exam code
Amazon Web Services
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related AIF-C01 topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1mediummultiple choice
Full question →

Refer to the exhibit. A company has the S3 bucket policy shown above. The company uses Amazon Rekognition to analyze images in the 'my-images' bucket. An IAM role used by a Lambda function calls Rekognition. Why might Rekognition be unable to read images from the bucket?

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "rekognition.amazonaws.com"
      },
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::my-images/*",
      "Condition": {
        "StringEquals": {
          "aws:SourceAccount": "123456789012"
        }
      }
    }
  ]
}
Question 2hardmultiple choice
Full question →

Refer to the exhibit. A team is configuring a SageMaker Model Bias job. The baseline job has been completed. However, the bias job fails with a resource not found error. What is the most likely cause?

Exhibit

ModelBiasJobConfig:
  Type: AWS::SageMaker::ModelBiasJobDefinition
  Properties:
    JobResources:
      InstanceConfig:
        InstanceType: ml.m5.large
        InstanceCount: 1
    ModelBiasBaselineConfig:
      BaseliningJobName: !Ref BaselineJob
    ModelBiasAppSpecification:
      ImageUri: !Ref Image
    StoppingCondition:
      MaxRuntimeInSeconds: 3600
Question 3hardmultiple choice
Full question →

A data scientist runs the SageMaker Clarify job shown in the exhibit for a credit risk model. After reviewing the results, they find a high bias metric for the gender facet. Which action is most consistent with responsible AI?

Exhibit

Refer to the exhibit.
```
{
  "ModelName": "credit-risk-v1",
  "InputName": "features",
  "JobName": "bias-report-20240101",
  "ProcessingJob": {
    "ProcessingResources": {
      "ClusterConfig": {
        "InstanceCount": 1,
        "InstanceType": "ml.m5.large"
      }
    }
  },
  "AppSpecification": {
    "ImageUri": "683313688378.dkr.ecr.us-west-2.amazonaws.com/sagemaker-clarify-processing:1.0"
  },
  "Config": {
    "BiasConfig": {
      "Label": "approved",
      "Facet": ["gender"],
      "GroupVariable": ["age_group"]
    }
  },
  "OutputConfig": {
    "S3OutputPath": "s3://my-bucket/bias-reports/"
  }
}
Question 4hardmultiple choice
Full question →

Refer to the exhibit. A developer is optimizing latency for a generative AI model deployed on SageMaker. Based on the exhibit, which change would most likely reduce per-token latency?

Exhibit

A SageMaker notebook cell output:
"Model size: 7B parameters\nInference time on ml.g5.2xlarge: 250ms per token\nBatch size: 1\nMemory utilization: 90%"
Question 5mediummultiple choice
Full question →

Refer to the exhibit. The training job is failing with an error 'CUDA out of memory'. Which hyperparameter change is MOST likely to resolve the issue?

Exhibit

Refer to the exhibit.

SageMaker Training Job Configuration:
{
  "AlgorithmSpecification": {
    "TrainingImage": "763104351884.dkr.ecr.us-west-2.amazonaws.com/huggingface-pytorch-training:1.13.1-transformers4.26.0-gpu-py39-cu117-ubuntu20.04",
    "TrainingInputMode": "File"
  },
  "HyperParameters": {
    "epochs": "3",
    "per_device_train_batch_size": "8",
    "learning_rate": "2e-5",
    "max_seq_length": "512"
  },
  "InputDataConfig": [
    {
      "ChannelName": "train",
      "DataSource": {
        "S3DataSource": {
          "S3DataType": "S3Prefix",
          "S3Uri": "s3://my-bucket/train/"
        }
      },
      "ContentType": "text/csv"
    }
  ],
  "OutputDataConfig": {
    "S3OutputPath": "s3://my-bucket/output/"
  },
  "ResourceConfig": {
    "InstanceType": "ml.p3.2xlarge",
    "InstanceCount": 1,
    "VolumeSizeInGB": 50
  },
  "RoleArn": "arn:aws:iam::123456789012:role/SageMakerRole",
  "StoppingCondition": {
    "MaxRuntimeInSeconds": 86400
  }
}
Question 6mediummultiple choice
Full question →

Refer to the exhibit. A user invokes Claude v2 using the AWS CLI. The response is truncated. What is the most likely cause?

Network Topology
$ aws bedrock invoke-modelmodel-id anthropic.claude-v2 \cli-binary-format raw-in-base64-out \Refer to the exhibit.```Assistant:","max_tokens_to_sample":100}' \output.json$ cat output.json
Question 7easymultiple choice
Full question →

A developer is calling the Amazon Bedrock InvokeModel API to generate text with the AI21 Labs Jurassic-2 Mid model. The API call includes a maxTokens parameter, but the request fails with the error shown in the exhibit. What is the most likely cause of this error?

Exhibit

Refer to the exhibit.

error: text generation failed with status code 400
{
  "error": {
    "message": "The model 'ai21.j2-mid-v1' does not support the 'maxTokens' parameter. Use 'maxTokens' with supported models or remove it.",
    "type": "invalid_request_error"
  }
}
Question 8hardmultiple choice
Full question →

Refer to the exhibit. An IAM policy is attached to a role used by an Amazon SageMaker notebook instance. The notebook instance attempts to upload a model artifact to the S3 bucket 'my-bucket' without specifying server-side encryption. What will happen?

Exhibit

Refer to the exhibit.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*",
      "Condition": {
        "StringEquals": {
          "s3:x-amz-server-side-encryption": "AES256"
        }
      }
    }
  ]
}
Question 9hardmultiple choice
Full question →

Refer to the exhibit. A data scientist is trying to run a SageMaker training job that uses training data from an S3 bucket encrypted with the specified KMS key. The training job fails with an access denied error. The IAM role shown is attached to the training job. What is the missing permission?

Exhibit

arn:aws:iam::123456789012:role/service-role/AmazonSageMaker-ExecutionRole-20210101T123456

Attached policy:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetObject",
                "s3:PutObject"
            ],
            "Resource": "arn:aws:s3:::my-bucket/*"
        },
        {
            "Effect": "Allow",
            "Action": "kms:Decrypt",
            "Resource": "arn:aws:kms:us-east-1:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        }
    ]
}
Question 10mediummultiple choice
Full question →

Refer to the exhibit. A company sets up a knowledge base for a customer support chatbot using Amazon Bedrock. Users report that the chatbot misses relevant details from long documents. Which change to the data source configuration would most likely improve retrieval?

Exhibit

AWS CloudFormation template snippet:
Resources:
  BedrockKnowledgeBase:
    Type: AWS::Bedrock::KnowledgeBase
    Properties:
      Name: support-kb
      RoleArn: arn:aws:iam::123456789012:role/BedrockKnowledgeBaseRole
      KnowledgeBaseConfiguration:
        Type: VECTOR
        VectorKnowledgeBaseConfiguration:
          EmbeddingModelArn: arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-embed-text-v1
      StorageConfiguration:
        Type: OPENSEARCH_SERVERLESS
        OpensearchServerlessConfiguration:
          CollectionArn: arn:aws:aoss:us-east-1:123456789012:collection/abc123
          FieldMapping:
            MetadataField: metadata
            TextField: text
  DataSource:
    Type: AWS::Bedrock::DataSource
    Properties:
      KnowledgeBaseId: !Ref BedrockKnowledgeBase
      Name: s3-source
      DataSourceConfiguration:
        Type: S3
        S3Configuration:
          BucketArn: arn:aws:s3:::my-docs-bucket
      VectorIngestionConfiguration:
        ChunkingConfiguration:
          ChunkingStrategy: FIXED_SIZE
Question 11hardmultiple choice
Full question →

Refer to the exhibit. You are trying to invoke a foundation model via Amazon Bedrock but receive this error. What should you do to resolve it?

Exhibit

Refer to the exhibit.
{
  "message": "You do not have access to the requested model. Please request access via the AWS Management Console."
}
Question 12easymultiple choice
Full question →

Refer to the exhibit. A data scientist ran a training job on Amazon SageMaker. The job failed with the error shown. What is the most likely cause?

Exhibit

{
  "TrainingJobName": "my-training-job-1",
  "TrainingJobStatus": "Failed",
  "FailureReason": "AlgorithmError: OutOfMemoryError: CUDA out of memory. Tried to allocate 4.00 GiB (GPU 0; 8.00 GiB total capacity; 3.95 GiB already allocated; 2.50 GiB free; 4.00 GiB reserved in total by PyTorch)"
}
Question 13hardmultiple choice
Full question →

Refer to the exhibit. An IAM policy is attached to a user. Which models can the user invoke?

Exhibit

Refer to the exhibit.
```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "bedrock:InvokeModel",
      "Resource": "arn:aws:bedrock:us-east-1:123456789012:model/anthropic.claude-v2"
    },
    {
      "Effect": "Deny",
      "Action": "bedrock:InvokeModel",
      "NotResource": "arn:aws:bedrock:us-east-1:123456789012:model/anthropic.claude-v2"
    }
  ]
}
```
Question 14mediummultiple choice
Full question →

Refer to the exhibit. A data scientist runs an Amazon SageMaker Clarify bias analysis on a binary classifier. The pre-training ClassImbalance is 1.5 and the post-training DPPL is 0.15. What should the data scientist conclude?

Exhibit

Refer to the exhibit.
```
{
  "smclarify_bias_report": {
    "pre_training": {
      "ClassImbalance": {
        "value": 1.5,
        "description": "Ratio of majority to minority class counts"
      }
    },
    "post_training": {
      "DPPL": {
        "value": 0.15,
        "description": "Difference in Positive Proportions in Predicted Labels"
      }
    }
  }
}
```
Question 15easymultiple choice
Full question →

Refer to the exhibit. A developer wants to ensure the notebook instance can access the internet to download packages. Which property configuration ensures this?

Exhibit

Refer to the exhibit.

```yaml
Resources:
  MyNotebookInstance:
    Type: AWS::SageMaker::NotebookInstance
    Properties:
      InstanceType: ml.t2.medium
      VolumeSizeInGB: 5
      DirectInternetAccess: Enabled
```

Excerpt from an AWS CloudFormation template.

These AIF-C01 practice questions are part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style AIF-C01 questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.