1 Answer
- Newest
- Most votes
- Most comments
3
Hello.
If you set up an AMI to be used with AutoScaling in advance and create a launch template based on it, you will be able to use EFS on EC2 launched with AutoScaling.
It is also possible to set user data and mount it when EC2 starts, as in the example CloudFormation template below.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-efs.html
https://medium.com/@sunilrm1998/elastic-file-system-on-auto-scaling-instances-with-custom-vpc-a796238e9fbf
Alternatively, you can create an EC2 instance, edit its "/etc/fstab" file to automatically mount the EFS at EC2 startup, then create an AMI from that EC2 instance and use it to create a launch template.
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago