[CLF-C02 Practice Questions Q31] The Service That Issues Temporary Credentials to Employees (AWS STS)

CLF-C02 Practice Questions Q31 The Service That Issues Temporary Credentials to Employees (AWS STS) Certification

“Secrets Manager has rotation, so I thought it would also issue credentials that expire.”
“Certificates have expiration dates too. Aren’t the certificates that ACM issues a kind of temporary credential?”

AWS Certified Cloud Practitioner (exam code CLF-C02, CLF below) asks you to tell the service that issues time-limited temporary credentials apart from services with similar names or features. It is easy to be pulled in by words such as “rotation” and “expiration.”

This article is Question 31 of a series that explains CLF practice questions one at a time. The author wrote the questions to match the scope of the exam; they are not actual exam questions. Choose your answer first, then read the explanation.


Question

A company authenticates its employees with a corporate identity provider (which supports SAML 2.0). The company wants to allow the authenticated employees to access AWS resources without creating an IAM user for each employee. The credentials used for access must be temporary ones that stop working automatically after about one hour. Which AWS service issues these credentials?

  • A. AWS Certificate Manager (ACM)
  • B. AWS Key Management Service (AWS KMS)
  • C. AWS Secrets Manager
  • D. AWS Security Token Service (AWS STS)

Once you have chosen your answer, open the section below.

Show the answer (click to open)

Answer: D

AWS STS is the service that issues temporary security credentials that expire. Employees authenticated by the identity provider assume an IAM role and receive temporary credentials, so there is no need to create an IAM user for each employee.


The answer is D

The correct answer is D, AWS Security Token Service (AWS STS).

STS is the service that issues temporary security credentials that expire. Employees authenticated by the identity provider assume an IAM role and receive temporary credentials. Let’s look at the options one at a time.


Explanation of each option

A: ACM handles certificates (incorrect)

On the left, AWS Certificate Manager (ACM) issues and manages an SSL/TLS certificate (with an expiration date), and with that certificate the communication between the user and the website on the right is encrypted with HTTPS. In the red frame at the bottom, a key icon marked with an X and the text "Not credentials for accessing AWS resources"

AWS Certificate Manager (ACM) is a service that issues and manages SSL/TLS certificates. As shown in the diagram, you use it to encrypt a website’s communication with HTTPS.

Certificates do have expiration dates, but they are not credentials for accessing AWS resources.

B: KMS manages encryption keys (incorrect)

On the left, AWS Key Management Service (AWS KMS) creates and manages an encryption key. On the right, data is encrypted with that key, and the encrypted data is decrypted again, shown as arrows in both directions. In the red frame at the bottom, a key icon marked with an X and the text "Does not issue credentials for accessing AWS"

AWS Key Management Service (AWS KMS) is a service that creates and manages the keys used to encrypt data. As shown in the diagram, you use a KMS key to encrypt data and to decrypt it again.

It does not issue the credentials that employees use to access AWS.

C: Secrets Manager stores and replaces values (incorrect)

On the left, AWS Secrets Manager stores DB passwords and other secrets encrypted, and rotation (example: every 30 days) replaces the current value with a new value. It replaces the stored value with a new one at a set interval. On the right, a red frame titled "What this question requires" shows issuing time-limited credentials every time an employee authenticates, marked with an X, and "Not a job for Secrets Manager (this is AWS STS)"

AWS Secrets Manager is a service that stores secrets, such as database passwords, encrypted. It can replace them automatically with new values at an interval you set. This is called rotation.

However, rotation means replacing a stored value with a new value. It does not issue time-limited credentials every time an employee authenticates.

D: STS issues temporary credentials (correct)

Four boxes connected by arrows from left to right: the corporate identity provider (SAML 2.0 sign-in), assuming the IAM role (AssumeRoleWithSAML), AWS STS issues temporary credentials (default: 1 hour), and AWS resources (S3 and EC2). The two boxes below: on the left, "Expires in minutes to 12 hours. Cannot be used after expiry. Not stored; created when requested". On the right, "No IAM user per employee. No need to hand out long-term access keys"

Let’s follow the diagram from the left. First, the employee is authenticated by the corporate identity provider. Next, the employee asks STS to assume an IAM role. With SAML 2.0, this is the AssumeRoleWithSAML operation.

STS issues temporary credentials for that role. The employee uses these credentials to access AWS resources.

Temporary credentials expire after anywhere from a few minutes to at most 12 hours, and cannot be used after that. With SAML 2.0, the default is one hour. You do not have to create an IAM user for each employee.


Long-term credentials and temporary credentials

An example of long-term credentials is the access key of an IAM user. It has no expiration date and can be used until you deactivate it yourself. Temporary credentials are issued by STS and expire after anywhere from a few minutes to at most 12 hours. Even if they leak, they stop working once they expire, so they are safer than handing out long-term access keys. They are the mechanism behind IAM roles and identity federation.

Long-term credentialsTemporary credentials
ExampleAccess key of an IAM userCredentials issued by STS
ExpirationNone (usable until you deactivate it yourself)Yes (a few minutes to at most 12 hours)
How it is createdStored and tied to the userNot stored; created when requested
Main useIssued for each IAM userIAM roles and identity federation

Key points

  • Issuing temporary (time-limited) credentials = AWS STS
  • People authenticated by an identity provider assume an IAM role, so no IAM user is needed for each employee
  • Secrets Manager stores and replaces values, KMS manages encryption keys, and ACM issues certificates

The course articles explain in detail AWS STS, the mechanism of assuming an IAM role to receive temporary credentials, and federation.

  • Lecture 10, Part 5: IAM and least privilege, in the “IAM roles” section
  • Lecture 10, Part 6: MFA, federation, and storing credentials, in the “Federation and IAM Identity Center” section

You can read all 14 lectures of AWS Cloud Practitioner Exam Prep in order from its series page.


The CLF-C02 Practice Questions series (100 questions)

All 100 questions with a reading guide: CLF-C02 Practice Questions

In this group (Questions 31–36: Authentication and accounts, web protection, and AWS Marketplace):

  • Question 31: The service that issues temporary credentials to employees (AWS STS) (this article)
  • Question 32: Tasks only the root user can do (closing the account, changing the email address)
  • Question 33: Member sign-in and social sign-in for an app (Amazon Cognito)
  • Question 34: Stopping a flood of requests from the same IP address (AWS WAF rate-based rules)
  • Question 35: DDoS protection at no extra charge (AWS Shield Standard)
  • Question 36: Using another company’s software from an AMI (AWS Marketplace)

This series is the English edition of 【CLF-C02 試験対策問題】, originally written in Japanese.

コメント

Copied title and URL