exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 8 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 8
Topic #: 1
[All AWS Certified Developer Associate Questions]

A company has an application that analyzes photographs. A developer is preparing the application for deployment to Amazon EC2 instances. The application's image analysis functions require a mix of GPU instances and CPU instances that run on Amazon Linux. The developer needs to add code to the application so that the functions can determine whether they are running on a GPU instance.
What should the functions do to obtain this information?

  • A. Call the DescribeInstances API operation and filter on the current instance ID. Examine the ElasticGpuAssociations property.
  • B. Evaluate the GPU AVAILABLE environment variable.
  • C. Call the DescribeElasticGpus API operation.
  • D. Retrieve the instance type from the instance metadata.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
JAMG54
Highly Voted 2 years, 7 months ago
D since you can obtain metadata info from EC2 instance using 169.254.169.254 ip
upvoted 6 times
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: D
A) - Eliminated (Though we can get the required information) - But This approach is unnecessary for detecting GPU instances because you can simply check the instance type from metadata.
upvoted 1 times
sumanshu
4 months, 1 week ago
B) Eliminated - There is no such environment variable like GPU AVAILABLE by default in Amazon Linux or EC2 instances
upvoted 1 times
sumanshu
4 months, 1 week ago
C) Eliminated - This API is used to describe Elastic GPUs, which are additional GPUs attached to instances. Elastic GPUs are typically used with general-purpose instances (like t2 or m5) that do not have native GPU capabilities but need limited GPU functionality for specific tasks. Native GPU instances (e.g., p3, g4) do not rely on Elastic GPUs because they have dedicated GPU hardware.
upvoted 1 times
sumanshu
4 months, 1 week ago
D) Correct - The application can make an HTTP request to this endpoint to retrieve the instance type and check whether it corresponds to a GPU instance (e.g., p3, g4, g5 families). http://169.254.169.254/latest/meta-data/instance-type
upvoted 2 times
...
...
...
...
AsmaZoheb
1 year, 3 months ago
i think so D http://169.254.169.254/latest/meta-data/ metadata available, you can retrieve the instance type, which includes information about the instance's hardware characteristics, including whether it has GPU capabilities.
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: D
Use the SDK or whatever technology has been used to perform image processing, it's possible for the application running on EC2, to query a specific internal URL requesting metadata about the instance and recognize if it's using GPU or CPU. Based of the kind of hw it's possible to differentiate the logic. To retrieve this metadata, the application should launch a curl command to the following link: http://169.254.169.254/latest/meta-data/
upvoted 3 times
...
LeoUrlian
2 years ago
Selected Answer: D
this D i think
upvoted 1 times
...
pancman
2 years, 2 months ago
Selected Answer: D
The only way to tell is getting the instance metadata. Don't be confused by the other options provided because they are there to confuse you because they are related to Elastic Elastic Graphics accelerators. Those are different from GPU instances. Elastic Graphics accelerators are a low-cost alternative to using GPU graphics instance types (such as G2 and G3).
upvoted 3 times
...
Krt5894
2 years, 2 months ago
Selected Answer: D
It should be B
upvoted 1 times
...
Pepepep
2 years, 3 months ago
sorry, yes it is D
upvoted 1 times
...
Pepepep
2 years, 3 months ago
Totally is B. You will retrieve the instance type using "curl http://169.254.169.254/latest/meta-data/instance-type" inside the instance to obtain the metadata associated to Instance Type.
upvoted 1 times
sumanshu
4 months, 1 week ago
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
upvoted 1 times
...
Phinx
2 years, 3 months ago
you mean D?
upvoted 3 times
...
...
Arnaud92
2 years, 6 months ago
Selected Answer: D
Answer D : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
upvoted 4 times
...
venimus_vidimus_vicimus
2 years, 7 months ago
Selected Answer: D
i think is d!
upvoted 2 times
...
Spamuel
2 years, 7 months ago
Selected Answer: D
D - Instance metadata
upvoted 2 times
...
Jabol
2 years, 7 months ago
Selected Answer: C
D would be correct but we don't want instance type from metadata, I believe B is correct https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeElasticGpus.html
upvoted 1 times
Jabol
2 years, 7 months ago
Ok, I'm wrong. We need instance type https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html
upvoted 1 times
...
...
thure
2 years, 7 months ago
"Amazon Elastic Graphics provides flexible, low-cost, and high performance graphics acceleration for your Windows instances." https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago