I'm writing an AWS Lambda function in Python and have an issue. Here is the relevant piece of code:
containerInstances = listContainerInstances['containerInstanceArns'][j]
containerInstancesDetails = ecs.describe_container_instances(cluster=cluster, containerInstances=containerInstances)
I get the following error:
Invalid type for parameter containerInstances, value: arn:aws:ecs:eu-west-1:11111111111:container-instance/11111111-1111-1111-1111-111111111111, type: <type 'unicode'>, valid types: <type 'list'>, <type 'tuple'>: ParamValidationError
Anyone knows how the fix this issue? Do i need to convert from unicode to list? If so, how? I tried several things which didn't help.
Please advise.
[j]on the first line ? According to the error msg,containerInstancesshould be a tuple or a list, but you only pick up one item at index 'j', instead of the whole list.