I'm really new to AWS ELB and I'm reading about how to automatically mount an EBS volume from a snapshot via the ebextensions script. I've found this post as a reference: https://aws.amazon.com/blogs/devops/customize-ephemeral-and-ebs-volumes-in-elastic-beanstalk-environments/
But basically, my question is, how do I set in the option settings to have it automatically pull the latest snapshot id? Because the snapshots will be updated daily, and I only want to get the latest snapshot without having to edit the ebextensions script each time.
This is what I'm thinking the ebextensions script will be:
commands: 01mkdir: command: "mkdir /mnt/ebs_snapshot" 02mount: command: "mount /dev/sdh /mnt/ebs_snapshot" option_settings: - namespace: aws:autoscaling:launchconfiguration option_name: BlockDeviceMappings value: /dev/sdh=(how to put latest snapshot id?)
But not sure how to incorporate that into the ebextensions script file...