Using cloud-init to install a specific package version

amazon ec2cloud-init

In the cloud-init documentation, it says it is possible to install packages with something like

packages:
 - nginx
 - php

However, I have not found a way to specify a specific version number for a package, e.g. nginx v1.6.0, or PHP 5.5.12

Is this possible? I would like to use the cloud-init as part of the AWS EC2 user data.

Thanks.

Best Answer

See Install arbitrary packages in Cloud config examples:

[P]ackages may be supplied as a single package name or as a list with the format [package, version] wherein the specifc [sic] package version will be installed.