You have created an AWS EC2 launch template with multiple versions. You want to ensure that your Auto Scaling group always uses the latest version of the launch template when launching instances.
Which configuration setting in the Auto Scaling group will achieve this behavior?
Think about how AWS identifies the most recent version of a launch template.
Setting the version to '$Latest' tells the Auto Scaling group to always use the newest version of the launch template. Using a fixed version number like '1' will always use that specific version, ignoring updates.
You want to launch EC2 instances using a launch template that automatically assigns an IAM role to the instances for accessing S3 buckets securely.
Where should you specify the IAM role in the launch template configuration?
Consider how AWS associates IAM roles with EC2 instances at launch time.
The IAM role must be specified in the 'IamInstanceProfile' section of the launch template. This ensures instances launched from the template automatically receive the role.
You update the user data script in an existing launch template version and set this new version as the default. What happens to the EC2 instances that were launched using the previous launch template versions?
Think about how launch templates affect instances after they are launched.
Launch templates define instance configuration at launch time only. Updating the template does not affect running instances; only new instances launched after the update use the new data.
You want to create a launch template that launches EC2 instances with two network interfaces: one primary and one secondary. Which configuration in the launch template correctly defines this setup?
Consider how AWS identifies multiple network interfaces on an instance.
The 'NetworkInterfaces' section allows specifying multiple interfaces with distinct 'DeviceIndex' values. 'DeviceIndex' 0 is the primary interface, and higher numbers are additional interfaces.
Your team uses launch templates for production EC2 instances. You want to deploy updates safely without affecting running instances and be able to roll back quickly if needed.
Which launch template versioning strategy best supports this goal?
Think about how to minimize risk and enable rollback when updating infrastructure.
Creating new versions and testing before updating the Auto Scaling group ensures stability. Using '$Latest' risks untested changes affecting production. Editing default versions or deleting old versions removes rollback options.