You must run a SageMaker Processing job from a SageMaker notebook to read data from a private S3 bucket encrypted with a KMS customer master key, preprocess it, and write results back to the same bucket. The preprocessing code is stored in a container image in Amazon ECR. What set of permission-related actions should you take to permit the notebook to create and run the processing job and allow the job to access the S3 bucket, the KMS key, and the ECR image?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an IAM role that grants permission to create SageMaker Processing jobs. Attach that role to the SageMaker notebook instance. When creating the SageMaker Processing job from the notebook, specify a separate IAM role for the processing job that has S3 read/write access to the bucket and the necessary KMS and ECR permissions..
Why this is the answer
The correct answer separates permissions based on the principle of least privilege. The SageMaker notebook instance needs permission to create a SageMaker Processing job. The Processing job itself, which runs as a separate entity, requires its own IAM role with permissions to access the S3 bucket (read/write), the KMS key (decrypt/encrypt), and the ECR image (pull). This is a standard and secure practice in AWS, where services often assume specific roles for their operations. The first incorrect option grants too many permissions to the notebook instance, violating the principle of least privilege. The third and fourth options incorrectly suggest using VPC endpoints as a primary solution for granting access permissions, or using access keys directly within the job, which is insecure and not the recommended way to grant permissions to AWS services.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed