-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImageBuilder: InvalidParameterValueException thrown for valid Arn #2224
Comments
Try appending "/1" to the ARNs you get back. I haven't been able to find resources to identify what that /1 is supposed to represent. You can't create a /2 version with the same semantic-version, so I'm not sure why it's there. The ARN regexes seem to require it even though the ARNs aren't always represented with that extra digit. |
I noticed the same. The console shows arns with the Interestingly, |
The same issue exists for Image Arns: for image in imagebuilder.list_images(owner='Self')['imageVersionList']:
imagebuilder.delete_image(imageBuildVersionArn=image['arn'])
Traceback (most recent call last):
File "<input>", line 2, in <module>
File "/Users/ahmed/pyenv/cloud-tools36/lib/python3.6/site-packages/botocore/client.py", line 272, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/ahmed/pyenv/cloud-tools36/lib/python3.6/site-packages/botocore/client.py", line 576, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidParameterValueException: An error occurred (InvalidParameterValueException) when calling the DeleteImage operation: The value supplied for parameter 'imageBuildVersionArn' is not valid. 'imageBuildVersionArn' must match pattern ^arn:aws[^:]*:imagebuilder:[^:]+:(?:\d{12}|aws):image/[a-z0-9-_]+/\d+\.\d+\.\d+/\d+$ |
@Ashex - Thank you for your post. You have to pass the arn, got from list_components to list_components_build_versions and then use that arn with get_component call. Something like this: import boto3
imagebuilder = boto3.client('imagebuilder')
for component in imagebuilder.list_components(owner='Self')['componentVersionList']:
print(component['arn'])
arn:aws:imagebuilder:us-west-2:123456789:component/test-component/1.1.1 Then use this arn with list_component_build_versions imagebuilder.list_component_build_versions(componentVersionArn='arn:aws:imagebuilder:us-west-2:123456789:component/test-component/1.1.1')
'componentSummaryList': [{'arn': 'arn:aws:imagebuilder:us-west-2:123456789:component/test-component/1.1.1/1',
'name': 'test_component',
'version': '1.1.1',
'platform': 'Linux',
'type': 'TEST',
'owner': '504809190933',
'dateCreated': '2019-12-11T18:53:04.937Z',
'tags': {}}]} Now you can use this arn with get_component api call imagebuilder.get_component(componentBuildVersionArn='arn:aws:imagebuilder:us-west-2:123456789:component/test-component/1.1.1/1') It is same for image_versions and image_build_versions. Each time a pipeline creates an image, it is creating a new image build version (example: /1, /2, etc.). So with Hope it helps. |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. |
An arn retrieved via the
list_components
operation throws an exception when passed toget_component
:Component arn returned from
list_components
:arn:aws:imagebuilder:eu-west-1:aws:component/python-3-linux/1.0.0
Component arn returned from
create_component
:arn:aws:imagebuilder:eu-west-1:01234567890:component/foo/0.0.13/1
It's not clear what the
/1
suffix is for.Interestingly, I can create an Image Recipe with a mix of these Arns and validation passes. The pipeline created with this recipe successfully generates an image.
Reproduced on boto3 1.10.33 and 1.10.34
The text was updated successfully, but these errors were encountered: