1 Answers
The ip tables-based restrictions are just going to be used to block access to the meta data service, i.e. block 169.254.169.254. If a student is able to elevate their privileges on the machine then they can bypass / change the ip tables rules and access the meta data service. Turning off the EC2 instance meta data service is much more reliable as nothing the student can do from the EC2 instance can grant them access to the credentials.
i.e. Answer A makes much sense and is more robust than answer C. In these types of exams, it’s better to think about which control would be more effective. Disabling the meta data service is also more simple than doing the IP Tables restrictions.