Skip to content

Add SageMaker Image IAM permissions and terminator - #342

Open
JanLikar wants to merge 2 commits into
mattclay:mainfrom
JanLikar:add-sagemaker-image-permissions
Open

Add SageMaker Image IAM permissions and terminator#342
JanLikar wants to merge 2 commits into
mattclay:mainfrom
JanLikar:add-sagemaker-image-permissions

Conversation

@JanLikar

@JanLikar JanLikar commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Adds the IAM permissions and terminator needed for the sagemaker_image integration tests in ansible-collections/amazon.ai (see PR #54).

Changes

aws/policy/paas.yaml

  • Added sagemaker:CreateImage, sagemaker:DescribeImage, sagemaker:UpdateImage, sagemaker:DeleteImage to AllowResourceRestrictedActionsWhichIncurNoFees with resource arn:aws:sagemaker:...:image/*
  • Added sagemaker:ListImages, sagemaker:AddTags, sagemaker:DeleteTags, sagemaker:ListTags to AllowUnrestrictedResourceActionsWhichIncurNoFees

aws/policy/security-services.yaml

  • Added arn:aws:iam::aws:policy/AmazonSageMakerFullAccess to the allowed iam:PolicyArn condition for iam:AttachRolePolicy so the test IAM role can be set up correctly

aws/terminator/paas.py

  • Added SageMakerImage terminator class to clean up leaked SageMaker Image resources after test runs, following the same pattern as the existing SageMakerCodeRepository terminator

Add sagemaker:CreateImage, sagemaker:DescribeImage, sagemaker:UpdateImage,
sagemaker:DeleteImage, sagemaker:ListImages, sagemaker:AddTags,
sagemaker:DeleteTags, sagemaker:ListTags permissions needed for the
amazon.ai sagemaker_image integration tests.

Also add AmazonSageMakerFullAccess to the allowed policies for
iam:AttachRolePolicy so the test IAM role can be created correctly.
@JanLikar
JanLikar force-pushed the add-sagemaker-image-permissions branch from 33ee83d to 32f7d06 Compare August 19, 2026 08:08
@JanLikar JanLikar changed the title Add SageMaker Image IAM permissions Add SageMaker Image IAM permissions and terminator Aug 19, 2026
@alinabuzachis

Copy link
Copy Markdown
Collaborator

@JanLikar Thank you for working on this. We do not want to create additional policy files, though, I opened this PR that will create some room for these policies that I'd like to merge it first and then rebase your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants