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 66 discussion

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

A developer needs to use the AWS CLI on an on-premises development server temporarily to access AWS services while performing maintenance. The developer needs to authenticate to AWS with their identity for several hours.
What is the MOST secure way to call AWS CLI commands with the developer's IAM identity?

  • A. Specify the developer's IAM access key ID and secret access key as parameters for each CLI command
  • B. Run the aws configure CLI command. Provide the developer's IAM access key ID and secret access key.
  • C. Specify the developer's IAM profile as a parameter for each CLI command.
  • D. Run the get-session-token CLI command with the developer's IAM user. Use the returned credentials to call the CLI
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
Spamuel
Highly Voted 2 years, 7 months ago
Selected Answer: D
D is correct as it allows for temporary credentials with a set time duration. https://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html
upvoted 6 times
Sirikou_0922
2 years, 7 months ago
Can u tell me why not B.?
upvoted 1 times
m_t_kd
2 years, 7 months ago
temporary access
upvoted 4 times
...
...
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: D
D) Correct - The get-session-token command is part of AWS Security Token Service (STS). It provides temporary security credentials that are valid for a short duration (by default, 12 hours for IAM users) and consist of: Access key Secret access key Session token
upvoted 1 times
sumanshu
4 months, 1 week ago
A) Eliminated - Passing credentials in command-line parameters can expose them to system logs
upvoted 1 times
sumanshu
4 months, 1 week ago
B) Eliminated - This stores long-term credentials on the server in plain text in the ~/.aws/credentials file. If the server is shared or compromised, these credentials can be stolen.
upvoted 2 times
...
...
...
xdkonorek2
1 year, 4 months ago
Selected Answer: B
"The developer needs to authenticate to AWS with their identity" Altough temporary credentials with "get-session-token" are most secure way to obtain extended privilages, it's safer to assume dev account already has enough access to get a job done, than that there is additional role with more privilages that can be fetched via this command. Option D is missing details
upvoted 2 times
JonasKahnwald
5 months, 2 weeks ago
It requires storing long-term credentials on the development server, which is not ideal for temporary access.
upvoted 1 times
...
...
rcaliandro
1 year, 10 months ago
Selected Answer: D
Even if A and B are both valid options, the most secure way to use the aws cli on premisis is by calling get-session-token to obtain temporary credentials. So, D is the correct answer
upvoted 1 times
JonasKahnwald
5 months, 2 weeks ago
A and B are not valid for me, as they both require storing sensitive data.
upvoted 1 times
...
...
gaddour_med
2 years, 2 months ago
T think the correct answer is C. use profile for each developper. -- profile option is used to replace adding access_key and token for each cli command. get-acess_token is required only for users with MFA enabled and for calling some API operation that require MFA authntificationy. MFA-enabled IAM users would need to call GetSessionToken and submit an MFA code that is associated with their MFA device. Using the temporary security credentials that are returned from the call, IAM users can then make programmatic calls to API operations that require MFA authentication
upvoted 2 times
...
sichilam
2 years, 3 months ago
D is getaccesstoken
upvoted 1 times
...
dark_cherrymon
2 years, 5 months ago
i was going for A, but it seems A and D are the same thing just D is temporary credientials
upvoted 1 times
...
habros
2 years, 6 months ago
Selected Answer: D
https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html Added layer of security by ensuring stale keys are not reused
upvoted 2 times
habros
2 years, 6 months ago
I’ll agree with B if it’s not “most secure” implementation
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