AWS Certified Solutions Architect – Professional — Question 511
An organization is having an application which can start and stop an EC2 instance as per schedule. The organization needs the MAC address of the instance to be registered with its software. The instance is launched in EC2-CLASSIC.
How can the organization update the MAC registration every time an instance is booted?
Answer options
- A. The organization should write a boot strapping script which will get the MAC address from the instance metadata and use that script to register with the application.
- B. The organization should provide a MAC address as a part of the user data. Thus, whenever the instance is booted the script assigns the fixed MAC address to that instance.
- C. The instance MAC address never changes. Thus, it is not required to register the MAC address every time.
- D. AWS never provides a MAC address to an instance; instead the instance ID is used for identifying the instance for any software registration.
Correct answer: A
Explanation
In EC2-CLASSIC, stopping and starting an instance can result in it being provisioned on a new host, which changes its MAC address. By using a bootstrapping script that runs at startup, the instance can query its own metadata to fetch the newly assigned MAC address and register it with the external application. Manually assigning a MAC address via user data is not supported, and EC2 instances do have MAC addresses, making the other options incorrect.