First, you'll need to install the package or compile it from source.
Since pam_yubico
only exists in the Fedora/EPEL repository which isn't enabled on Amazon Linux by default, you first have to run:
sudo yum-config-manager --enable epel
Then you can install the package:
sudo yum install pam_yubico