Creating device pool for a particular set of android phones in aws devicefarm


I am trying to run android test using aws devicefarm and the code for creating a device pool is given below.

The CLI command below creates a Device Pool consisting of all available Android devices:

[ec2-user]$  aws devicefarm create-device-pool --project-arn
 --name myAndroidDevicePool --rules '[{"attribute": "PLATFORM", "operator": "EQUALS", "value": "\"ANDROID\""}]'

But the issue here is, it will run for all android devices, and I only want to run in LG Nexus 5. Could anyone tell me how we can define for device pool for a single mobile device or set of devices but not all. I couldn’t find a clear documentation for it. Thank you


In addition to what @Rohan mentioned in this comment and to answer your question about identifying the ARN of a device.

  1. You can first call list-devices. This will give you the device ARN for all the devices so you can locate the device ARN for LG Nexus 5.
  2. Use that ARN in the rules as ARN parameter.

Since the ARN is a unique identifier of a resource within device farm you should be able to create a device pool with a single device which in your case is LG Nexus 5.

Let me know if you are not able to proceed.

Answered By – NikofTime

Leave a Comment