HomeAWS Developer Associate Prep 2Questions 21–30
AWS Developer Associate Prep 2Part 3 of 3

AWS Developer Associate Prep 2 Exam Questions & Answers 2026 (21–30)

AWS Developer Associate Prep 2 practice questions and answers 2026. Tap an option to test yourself — you'll see the correct answer and a plain-English explanation for every question. Free, no login.

Practise AWS Developer Associate Prep 2 questions free, download the PDF, or unlock timed mock exams when you are ready.
Multiple choice — pick the best answer, then reveal it
  1. Q21A developer is building a web application that needs to authenticate users against an existing corporate directory. Which AWS service should be used to implement identity federation?

    • AAWS AppSync
    • BAWS IAM
    • CAmazon RDS
    • DAmazon Cognito
    Show answer

    ✓ Correct answer: D. Amazon Cognito

    Amazon Cognito supports identity federation with external identity providers including SAML, OIDC, Facebook, Google, etc., allowing users to authenticate with existing credentials while accessing AWS resources.

  2. Q22Which of the following is a best practice for securing AWS Lambda environment variables containing sensitive information?

    • AInclude them directly in your function code
    • BStore them in plaintext but use IAM roles
    • CEncrypt them using AWS KMS
    • DHardcode them in your Lambda deployment package
    Show answer

    ✓ Correct answer: C. Encrypt them using AWS KMS

    AWS KMS should be used to encrypt sensitive environment variables in Lambda functions, providing an additional layer of security for sensitive data beyond the default encryption that Lambda provides.

  3. Q23A developer needs to grant an Amazon S3 bucket access to an AWS Lambda function. Which type of policy should be used?

    • AIdentity-based policy
    • BResource-based policy
    • CTrust policy
    • DService control policy
    Show answer

    ✓ Correct answer: B. Resource-based policy

    Resource-based policies are attached directly to the resource (in this case, the S3 bucket) and define who has access to that resource and what actions they can perform.

  4. Q24Which AWS service should be used to securely store and automatically rotate database credentials used by an application?

    • AAWS Secrets Manager
    • BAWS Key Management Service (KMS)
    • CAWS Certificate Manager
    • DAmazon S3
    Show answer

    ✓ Correct answer: A. AWS Secrets Manager

    AWS Secrets Manager is designed to protect access to applications, services, and IT resources without hardcoding credentials. It offers automatic rotation of secrets for supported services.

  5. Q25A developer is implementing OAuth 2.0 authentication in an application. Which type of token is commonly used to securely transmit authentication information between parties?

    • ASSH key
    • BSMTP token
    • CXML token
    • DJWT (JSON Web Token)
    Show answer

    ✓ Correct answer: D. JWT (JSON Web Token)

    JSON Web Tokens (JWT) are an open standard for securely transmitting information between parties as a JSON object. They're commonly used with OAuth 2.0 to represent claims between two parties.

  6. Q26Which AWS service can be used to enforce encryption of data at rest in an Amazon S3 bucket?

    • AAWS WAF
    • BAWS Shield
    • CAWS Key Management Service (KMS)
    • DAmazon Inspector
    Show answer

    ✓ Correct answer: C. AWS Key Management Service (KMS)

    AWS Key Management Service (KMS) manages encryption keys and integrates with S3 to enforce server-side encryption of objects stored in S3 buckets.

  7. Q27A developer needs to implement fine-grained access control for objects in an Amazon S3 bucket. Which S3 feature should be used?

    • AS3 Transfer Acceleration
    • BS3 Access Control Lists (ACLs)
    • CS3 Event Notifications
    • DS3 Intelligent-Tiering
    Show answer

    ✓ Correct answer: B. S3 Access Control Lists (ACLs)

    Amazon S3 Access Control Lists (ACLs) provide fine-grained control over specific objects within buckets, allowing you to manage permissions at the object level.

  8. Q28Which of the following is a best practice for managing AWS access credentials in a CI/CD pipeline?

    • AUse IAM roles for EC2 instances or services running the pipeline
    • BStore access keys directly in your code repository
    • CHardcode credentials in your build scripts
    • DUse the same access key for all environments
    Show answer

    ✓ Correct answer: A. Use IAM roles for EC2 instances or services running the pipeline

    IAM roles provide temporary credentials that automatically rotate, making them more secure than using long-term access keys in CI/CD environments.

  9. Q29When implementing SAML 2.0 federation with AWS, which service acts as the identity provider (IdP)?

    • AAmazon API Gateway
    • BAmazon Cognito
    • CAWS IAM
    • DThe external corporate directory system
    Show answer

    ✓ Correct answer: D. The external corporate directory system

    In a SAML 2.0 federation with AWS, the external corporate directory (like Active Directory or another SAML-compatible identity system) acts as the identity provider, authenticating users and providing assertions to AWS.

  10. Q30A developer needs to secure communication between microservices in an Amazon ECS cluster. Which AWS service should be used?

    • AAmazon S3
    • BAWS Secrets Manager
    • CAWS Certificate Manager
    • DAmazon Cognito
    Show answer

    ✓ Correct answer: C. AWS Certificate Manager

    AWS Certificate Manager provides, manages, and deploys public and private SSL/TLS certificates for use with AWS services, making it the appropriate choice for securing communication between microservices.

Free practice here. Timed mocks when you are ready.

Use the free AWS Developer Associate Prep 2 sample, download the PDF, then unlock web-based timed mock exams for a full exam rehearsal.