python boto3 parameter validation error


Here I have written a python program to start an instance that matches all the conditions. But The following error is displayed while executing the program.botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter InstanceIds, value: i-012345678, type: <type 'str'>, valid types: <type 'list'>, <type 'tuple'>
.Below is my code:


The error itself is self-explanatory. You have to pass a list or tuple of instance ids rather than just string. You can see this in the docs

See the updated code below.

Leave a Reply