It's simple. You need to first download the package. In next step add rpm to your ebextensions directory. Create a .config file in the .ebextensions directory and add suitable commands.
Lastly, swap "mod-pagespeed.rpm" for whatever the actual rpm file name is