Issue
Following the documentation of boto3 ec2, I'm trying to extend the launch permissions of a custom built AMI to allow an organizational unit.
arns = [string list of arns]
for arn in arns:
r = ec2.modify_image_attribute(
ImageId=image['ImageId'],
LaunchPermission={
'Add': [
{
'OrganizationalUnitArn': arn
},
],
}
)
Running the above code I get the following error:
botocore.exceptions.ParamValidationError: Parameter validation failed:
Unknown parameter in LaunchPermission.Add[0]: "OrganizationalUnitArn", must be one of: Group, UserId
The ARN is supplied as a string, and the code itself was directly copied from the documentation. What's causing the error?
Solution
My local boto3 package was simply outdated, upgrading it fixed the problem.
Answered By - circo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.