Here's how we install puppet onto our EC2 instances using ELB customizations through .ebextensions. Certain details omitted for the sake of security. I've been unable to make an AMI that contains a preinstalled version of puppet. Each time the instance gets provisioned onto a sever, the environment and certname are out of sync and never seem to get updated.
$CHIRPIFY_ENV is an ENV variable that gets introduced via the ELB configuration.
# Install puppet agent onto the EC2 instance. # NOTE the path for elasticbeanstalk variables changes between ELB # applications. Newer versions of pre-packaged ELB applications have entirely # different paths, so the following directives are not necessarily compatible # i.e. /opt/elasticbeanstalk/containerfiles/envars.d