- Newest
- Most votes
- Most comments
It seems you're encountering issues with previewing images in your annotation instructions for a labeling job, likely in Amazon SageMaker Ground Truth. The error message suggests there's a problem with the S3 URI format when using the "grant_read_access" function. This function is used to generate temporary access to S3 objects that aren't publicly accessible.
To resolve this issue:
-
Make sure you're using the correct format for the image URL. If your image is in a private S3 bucket, use this format:
{{ 'https://s3.amazonaws.com/your-bucket-name/image-file-name' | grant_read_access }}
Replace 'your-bucket-name' and 'image-file-name' with your actual bucket name and image file name.
-
Ensure that the S3 URI is correctly formatted and not empty. The error message suggests that the input to "grant_read_access" is empty, which is invalid.
-
If you're still having trouble, check that your IAM role has the necessary permissions to access the S3 bucket and objects.
-
For the images not showing up in the good and bad options, make sure you're using the correct URL format as mentioned above if they're in a private S3 bucket.
-
Note that when using this method, you might see a broken image icon in the instructions editor. This is normal. The image should appear correctly when you preview the tool in the rendered preview.
If you continue to have issues, you may want to check your S3 bucket settings, ensure the images exist in the specified location, and verify that your IAM permissions are set up correctly to allow access to these S3 objects.
Sources
Create instruction pages - Amazon SageMaker AI
Creating Good Worker Instructions - Amazon SageMaker
Use IP-restricted presigned URLs to enhance security in Amazon SageMaker Ground Truth | AWS Machine Learning Blog
Relevant content
- asked a year ago
- asked 3 years ago
- AWS OFFICIALUpdated 10 months ago
So I should add this {{ 'https://s3.amazonaws.com/your-bucket-name/image-file-name' | grant_read_access }} to my bucket policy?