I need to attach a static private IP to an instance in an ASG. Since I can't specify it in the Launch Template, I'm using a user-data script to attach an existing ENI on instance startup. It works fine with --device-index 1
but then I get a total of two IPs.
Why is it not possible to have --device-index 0
to attach only the IP address I need?
According to the AWS Certified Solutions Architect Study Guide,
My best guess is that by the time you run your user-data script, you already have a primary.network interface attached.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.