Amazon AWS Certified Security — Speciality SCS-C02 Exam Dumps and Practice Test Questions Set 8 Q106-120
Visit here for our full Amazon AWS Certified Security — Specialty SCS-C02 exam dumps and practice test questions.
Question106:
A global enterprise is deploying Amazon S3 to store intellectual property that must be protected from accidental or malicious deletion, encrypted at rest with customer-managed KMS keys, and auditable across multiple accounts and regions. The security team also requires automated remediation of non-compliant objects. Which solution best meets these requirements?
A) Enable default SSE-S3 encryption on all buckets and rely on developers to enforce KMS key usage.
B) Use S3 Object Lock in compliance mode to prevent deletion, enforce SCPs to mandate customer-managed KMS key usage, implement EventBridge rules for automated remediation, apply bucket policies to enforce least-privilege access, and consolidate CloudTrail logs into a centralised audit account.
C) Encrypt objects manually after upload and monitor compliance with periodic manual checks.
D) Enable versioning and rely on administrators to manually review object modifications.
Answer:
B
Explanation:
Option A provides basic SSE-S3 encryption, which encrypts objects at rest automatically. However, it does not enforce the use of customer-managed KMS keys organisation-wide, leaving room for non-compliance. Relying on developers to apply the correct key increases the risk of human error. SSE-S3 cannot prevent deletions, whether accidental or malicious, and lacks automated monitoring and remediation capabilities. Additionally, there is no centralised audit mechanism to track compliance across multiple accounts or regions. While straightforward to implement, this approach is insufficient for enterprise-grade security for sensitive intellectual property.
Option B offers a comprehensive and integrated approach. S3 Object Lock in compliance mode ensures that all objects remain immutable during the retention period, preventing deletion or modification even by administrators, mitigating both accidental deletions and insider threats. Service Control Policies (SCPs) enforce the mandatory use of customer-managed KMS keys across all accounts, ensuring consistent encryption compliance. EventBridge rules monitor S3 for non-compliant objects and trigger automated remediation workflows, such as re-encrypting objects with the approved KMS key or moving objects to quarantine buckets, ensuring continuous compliance without manual intervention. Bucket policies enforce least-privilege access, restricting permissions only to authorised IAM roles, reducing the risk of unauthorised access. Consolidating CloudTrail logs into a centralised audit account provides complete visibility and traceability, supporting compliance reporting, monitoring, and forensic investigations. Together, these measures implement preventive, detective, and corrective controls, ensuring enterprise-grade security, compliance, and operational efficiency.
Option C, manually encrypting objects and monitoring compliance, is reactive, labor-intensive, and prone to human error. Sensitive objects may remain unencrypted for extended periods, exposing critical intellectual property to compromise. Manual checks cannot scale across multiple accounts and regions and provide limited real-time enforcement or auditing. Option D, relying on versioning and manual review, is also reactive and operationally heavy. Versioning can restore deleted objects but does not prevent deletions, and manual audits are prone to oversight.
Option B is the only solution that delivers end-to-end preventive, detective, and corrective controls for multi-account, multi-region S3 environments, ensuring encryption compliance, immutability, access control, automated remediation, and centralised auditing.
Question107:
A healthcare organization is migrating sensitive patient records to Amazon RDS. Security requirements include encryption at rest using customer-managed keys, encryption in transit, strict identity-based access control, automated credential rotation, and centralised auditing for all database operations and configuration changes. Which solution satisfies these requirements?
A) Enable RDS encryption with AWS-managed keys, grant developers full access, and use SSL/TLS connections.
B) Use customer-managed KMS keys for encryption, enforce SSL/TLS connections, implement IAM database authentication, rotate credentials automatically using AWS Secrets Manager, and enable CloudTrail logging.
C) Store database credentials in environment variables and rely on default encryption.
D) Enable point-in-time recovery and manually review logs periodically.
Answer:
B
Explanation:
Option A provides basic encryption using AWS-managed keys and SSL/TLS for data in transit, but granting developers full access violates least-privilege principles and increases the risk of unauthorised or accidental misuse of sensitive patient data. AWS-managed keys do not offer granular access controls or detailed audit trails. Lack of automated credential rotation leaves long-lived credentials vulnerable to compromise. Centralized auditing is absent, which reduces visibility and compliance capability. While this configuration is easy to implement, it fails to meet stringent regulatory requirements such as HIPAA and enterprise security standards for sensitive healthcare data.
Option B offers a comprehensive solution integrating preventive, detective, and corrective controls. Customer-managed KMS keys encrypt RDS data at rest, providing granular control, auditability, and rotation. SSL/TLS encrypts data in transit, preventing interception and ensuring confidentiality. IAM database authentication eliminates the need for static credentials, enforcing identity-based access control and least-privilege principles. AWS Secrets Manager automates credential rotation, reducing exposure risk and operational burden. CloudTrail logging captures all database operations and configuration changes, providing centralised audit trails for monitoring, forensic analysis, and compliance reporting. This integrated approach ensures that patient records are encrypted, accessed only by authorised personnel, rotated automatically, and auditable, fully satisfying enterprise-scale security and compliance requirements.
Option C, storing credentials in environment variables, exposes sensitive data and lacks automated rotation and centralised auditing. Option D, relying on point-in-time recovery and manual log review, is reactive and operationally intensive, offering no preventive measures or automated compliance monitoring.
Only Option B meets all preventive, detective, and corrective requirements, ensuring secure, auditable, and compliant management of sensitive patient records in RDS.
Question108:
A financial organization requires Amazon S3 storage for highly sensitive transactional data with strict requirements for immutability, prevention of accidental or malicious deletions, mitigation of insider threats, and comprehensive audit logging. Which solution satisfies these requirements?
A) Enable S3 versioning and rely on developers to prevent deletion.
B) Use S3 Object Lock in compliance mode, enforce bucket policies restricting access, and enable CloudTrail logging.
C) Maintain separate backups and manually track deletions.
D) Encrypt objects using SSE-S3 and allow developers to manage access manually.
Answer:
B
Explanation:
Option A, using versioning, enables recovery of deleted or modified objects, but it does not prevent deletion or modification by privileged users. Relying on developers to enforce deletion restrictions introduces operational risk and human error. Versioning alone does not provide the immutability guarantees or centralised auditing required for regulatory compliance in financial environments.
Option B provides a comprehensive solution. S3 Object Lock in compliance mode ensures WORM (Write Once, Read Many) immutability, preventing deletion or modification during the retention period. Bucket policies enforce least-privilege access, reducing the risk of insider threats. CloudTrail logging captures all object-level operations, including attempted deletions or policy violations, providing a centralised , immutable audit trail for regulatory compliance and forensic investigations. Preventive controls (Object Lock and bucket policies), detective controls (CloudTrail logging), and corrective mechanisms (audit and remediation) are fully integrated, ensuring enterprise-grade security, operational efficiency, and compliance.
Option C, maintaining separate backups and manually tracking deletions, is reactive, labor-intensive, and prone to oversight. Option D, using SSE-S3 encryption with manual access management, ensures confidentiality but does not provide immutability or auditability, leaving critical gaps in security and compliance.
Option B is the only solution that addresses all preventive, detective, and corrective requirements for secure, immutable, auditable storage of sensitive financial data.
Question109:
A healthcare organization processes sensitive patient data using AWS Lambda functions. Security policies require that functions are invoked only through approved API Gateway endpoints, and all invocations must be auditable. Which solution best meets these requirements?
A) Allow all IAM users to invoke Lambda functions and rely on logging.
B) Attach resource-based policies to Lambda functions allowing invocation only from approved API Gateway principals and enable CloudTrail logging.
C) Store invocation secrets in environment variables for developers.
D) Protect Lambda functions with API keys and rely on developers not to share them.
Answer:
B
Explanation:
Option A allows unrestricted Lambda invocation and relies solely on logging, which provides no preventive control and exposes sensitive patient data to potential unauthorised access. Option C exposes sensitive invocation secrets and provides no enforcement mechanism. Option D relies on API key secrecy, which is prone to accidental sharing and misuse, making it unreliable for sensitive workloads.
Option B enforces preventive access control via resource-based policies, allowing invocation only from approved API Gateway principals. Unauthorised attempts are blocked automatically. CloudTrail logging captures all invocation events, providing centralised auditing, monitoring, and forensic capabilities. Preventive, detective, and corrective controls are integrated, ensuring compliance with security policies and healthcare regulations while protecting sensitive data. This approach provides strong security, auditability, and operational efficiency.
Question110:
A company operates multiple EC2 instances that access sensitive internal APIs. Security requirements include least-privilege access, centralised credential management, automated secret rotation, and auditable logs. Which solution best satisfies these requirements?
A) Store API keys in environment variables and rotate manually.
B) Use AWS Systems Manager Parameter Store with SecureString parameters, assign IAM roles to EC2 instances to retrieve secrets, enable automated rotation, and monitor access with CloudTrail.
C) Hard-code credentials in applications and review logs weekly.
D) Use long-lived IAM user credentials for each EC2 instance.
Answer:
B
Explanation:
Option A exposes credentials in environment variables, lacks automated rotation, and increases operational overhead and risk. Option C introduces long-lived static credentials, which are difficult to rotate, audit, and manage securely. Option D relies on long-lived IAM user credentials, creating a high risk of compromise and operational challenges.
Option B provides a secure, automated, and auditable solution. SecureString parameters encrypt credentials and enforce access control. IAM roles assigned to EC2 instances enforce least-privilege access. Automated rotation reduces exposure risk and operational complexity. CloudTrail logs all access events, providing centralised auditing, monitoring, and forensic capabilities. By integrating preventive, detective, and corrective controls, Option B ensures secure, auditable, and operationally efficient access to sensitive APIs across EC2 instances, fully satisfying enterprise security and compliance requirements.
Question111:
A multinational enterprise is deploying Amazon S3 to store highly sensitive intellectual property. Security requirements include encryption at rest using customer-managed KMS keys, prevention of accidental or malicious deletion, enforcement of least-privilege access, real-time detection of policy violations, automated remediation, and centralised audit logging across multiple accounts and regions. Which solution best meets these requirements?
A) Enable default SSE-S3 encryption on all buckets and rely on developers to enforce KMS key usage.
B) Implement S3 Object Lock in compliance mode to enforce immutability, enforce Service Control Policies (SCPs) to mandate customer-managed KMS key usage, configure EventBridge rules for automated remediation, apply bucket policies for least-privilege access, and consolidate CloudTrail logs into a centralised audit account.
C) Encrypt objects manually after upload and rely on developers to monitor compliance.
D) Enable versioning and rely on administrators to manually review object modifications.
Answer:
B
Explanation:
Option A relies on default SSE-S3 encryption. While SSE-S3 encrypts data at rest automatically, it does not allow enforcement of customer-managed KMS keys across multiple accounts and regions. This creates the potential for misconfiguration and non-compliance. SSE-S3 cannot prevent deletion, whether accidental or malicious, and lacks integrated real-time monitoring or automated remediation. Relying on developers to manually enforce KMS usage increases operational risk and human error. Centralized auditing is absent, making it difficult to monitor or prove compliance across regions. This approach is simple but insufficient for enterprise-grade requirements, especially for highly sensitive intellectual property.
Option B provides a comprehensive enterprise solution. S3 Object Lock in compliance mode ensures WORM (Write Once, Read Many) immutability, preventing deletion or modification for a specified retention period. SCPs enforce the mandatory use of customer-managed KMS keys across accounts, ensuring consistent encryption compliance. EventBridge monitors for policy violations and triggers automated remediation, such as re-encrypting non-compliant objects or moving them to secure quarantine buckets, reducing manual intervention. Bucket policies enforce least-privilege access, limiting permissions to authorised IAM roles and reducing insider threat risk. CloudTrail consolidates logs into a centralised account, providing full visibility for auditing, forensic investigations, and compliance reporting. This solution integrates preventive, detective, and corrective controls, covering immutability, encryption compliance, access enforcement, real-time monitoring, and auditing across a multi-account, multi-region setup.
Option C relies on manual encryption and monitoring. This approach is error-prone and reactive. Objects may remain unencrypted for periods, exposing sensitive data. Manual compliance monitoring does not scale across multiple accounts and regions, limiting effectiveness. Option D, using versioning and manual reviews, is also reactive. While versioning allows recovery of deleted objects, it does not prevent deletions or enforce KMS key usage. Manual review is labor-intensive, inconsistent, and does not provide real-time compliance or automated remediation.
Option B is the only approach that fully integrates preventive, detective, and corrective measures to meet all enterprise security requirements for S3. It ensures encryption compliance, immutability, access control, automated remediation, real-time monitoring, and centralised auditing, offering a robust solution for multi-account, multi-region intellectual property storage.
Question112:
A healthcare organization is migrating sensitive patient data to Amazon RDS. Security requirements include encryption at rest using customer-managed KMS keys, encryption in transit, strict identity-based access control, automated credential rotation, and centralised auditing of all database operations and configuration changes. Which solution best meets these requirements?
A) Enable RDS encryption with AWS-managed keys, grant developers full access, and use SSL/TLS connections.
B) Use customer-managed KMS keys for encryption, enforce SSL/TLS, implement IAM database authentication, rotate credentials automatically with AWS Secrets Manager, and enable CloudTrail logging.
C) Store database credentials in environment variables and rely on default encryption.
D) Enable point-in-time recovery and manually review logs periodically.
Answer:
B
Explanation:
Option A provides basic encryption with AWS-managed keys and SSL/TLS for data in transit. However, granting developers full access violates least-privilege principles and increases the risk of unauthorised access or accidental misuse of sensitive patient data. AWS-managed keys do not allow granular access control or detailed audit logging. Lack of automated credential rotation leaves credentials valid for extended periods, creating security vulnerabilities. Centralized auditing is not enabled, limiting compliance visibility and forensic capability. While simple to configure, Option A does not meet regulatory requirements such as HIPAA for sensitive healthcare data.
Option B provides a complete, enterprise-ready solution integrating preventive, detective, and corrective controls. Customer-managed KMS keys encrypt data at rest, allowing control over key rotation, access policies, and auditing. SSL/TLS encrypts data in transit, ensuring protection against interception. IAM database authentication eliminates static credentials, enforcing identity-based, least-privilege access control. AWS Secrets Manager automates credential rotation, reducing the risk of compromised credentials and operational burden. CloudTrail captures all database operations and configuration changes, providing centralised auditing for monitoring, forensic investigations, and regulatory compliance reporting. This integrated approach ensures sensitive patient records are encrypted, accessible only to authorised personnel, automatically rotated, and fully auditable, meeting enterprise-scale security and compliance requirements.
Option C relies on storing credentials in environment variables, exposing sensitive data, lacking automated rotation, and failing centralised auditing. Option D, point-in-time recovery with manual log review, is reactive, operationally intensive, and lacks preventive or automated monitoring measures.
Option B ensures encryption compliance, least-privilege access, automated credential management, and centralised auditing, providing the optimal solution for secure, compliant management of sensitive patient data in RDS.
Question113:
A financial organization requires Amazon S3 storage for highly sensitive transactional data with strict requirements for immutability, prevention of accidental or malicious deletions, mitigation of insider threats, and comprehensive audit logging. Which solution satisfies these requirements?
A) Enable S3 versioning and rely on developers to prevent deletion.
B) Use S3 Object Lock in compliance mode, enforce bucket policies restricting access, and enable CloudTrail logging.
C) Maintain separate backups and manually track deletions.
D) Encrypt objects using SSE-S3 and allow developers to manage access manually.
Answer:
B
Explanation:
Option A, using versioning, enables recovery of deleted or modified objects, but it does not prevent deletion or modification by privileged users. Relying on developers introduces operational risk and human error. Versioning alone does not guarantee immutability or provide centralised audit logging, which are critical for regulatory compliance in financial environments.
Option B provides a comprehensive enterprise solution. S3 Object Lock in compliance mode ensures WORM immutability, preventing deletion or modification during a defined retention period. Bucket policies enforce least-privilege access, mitigating insider threats. CloudTrail logging captures all object-level operations, including attempted deletions, modifications, or policy violations, providing centralised audit trails for compliance and forensic investigation. Preventive controls (Object Lock, bucket policies), detective controls (CloudTrail), and corrective mechanisms (audit and remediation) are integrated, ensuring enterprise-grade security, operational efficiency, and regulatory compliance.
Option C, maintaining separate backups and manually tracking deletions, is reactive, labor-intensive, and prone to oversight. Option D, SSE-S3 encryption with manual access management, ensures confidentiality but does not enforce immutability or centralised audit trails, leaving critical compliance gaps.
Option B is the only approach that satisfies all preventive, detective, and corrective requirements for secure, immutable, auditable storage of highly sensitive financial data.
Question114:
A healthcare organization processes sensitive patient data using AWS Lambda functions. Security policies require Lambda invocations only through approved API Gateway endpoints and centralised auditing. Which solution best meets these requirements?
A) Allow all IAM users to invoke Lambda functions and rely on logging.
B) Attach resource-based policies to Lambda functions allowing invocation only from approved API Gateway principals and enable CloudTrail logging.
C) Store invocation secrets in environment variables for developers.
D) Protect Lambda functions with API keys and rely on developers not to share them.
Answer:
B
Explanation:
Option A allows unrestricted Lambda invocation and relies solely on logging, providing no preventive control. Sensitive patient data could be exposed to unauthorised access, violating compliance requirements. Option C exposes sensitive secrets in environment variables, with no enforcement mechanism. Option D relies on API key secrecy, which is prone to accidental sharing or misuse, making it unreliable for sensitive workloads.
Option B provides a secure, auditable solution. Resource-based policies restrict Lambda invocation to approved API Gateway principals, preventing unauthorised access. CloudTrail captures all invocation events, providing centralised auditing, monitoring, and forensic capability. Preventive, detective, and corrective controls are integrated, ensuring compliance with healthcare regulations and secure handling of sensitive patient data. This solution balances operational efficiency, compliance, and security best practices.
Question115:
A company operates multiple EC2 instances that access sensitive internal APIs. Security requirements include least-privilege access, centralised credential management, automated secret rotation, and auditable logs. Which solution meets these requirements?
A) Store API keys in environment variables and rotate manually.
B) Use AWS Systems Manager Parameter Store with SecureString parameters, assign IAM roles to EC2 instances to retrieve secrets, enable automated rotation, and monitor access with CloudTrail.
C) Hard-code credentials in applications and review logs weekly.
D) Use long-lived IAM user credentials for each EC2 instance.
Answer:
B
Explanation:
Option A exposes credentials in environment variables and lacks automated rotation, increasing security risk and operational burden. Option C introduces long-lived static credentials, which are difficult to rotate, audit, and manage securely. Option D relies on long-lived IAM user credentials, increasing exposure risk and operational complexity.
Option B provides a secure, automated, and auditable solution. SecureString parameters encrypt credentials and enforce access control. IAM roles assigned to EC2 instances enforce least-privilege access, allowing only authorised instances to retrieve secrets. Automated rotation reduces exposure risk and operational complexity. CloudTrail logs all access events, providing centralised auditing, monitoring, and forensic capabilities. Preventive, detective, and corrective controls are integrated, ensuring secure, auditable, and operationally efficient access to sensitive APIs, fully meeting enterprise security and compliance requirements.
Question116:
A global enterprise is moving sensitive financial records to Amazon S3. Security requirements include prevention of accidental or malicious deletion, encryption at rest using customer-managed KMS keys, least-privilege access enforcement, automated remediation of non-compliant objects, and centralised audit logging across multiple accounts and regions. Which solution best meets these requirements?
A) Enable default SSE-S3 encryption on all buckets and rely on developers to enforce KMS key usage.
B) Implement S3 Object Lock in compliance mode to enforce immutability, enforce Service Control Policies (SCPs) to mandate customer-managed KMS key usage, configure EventBridge rules for automated remediation, apply bucket policies for least-privilege access, and consolidate CloudTrail logs into a centralised audit account.
C) Encrypt objects manually after upload and rely on developers to monitor compliance.
D) Enable versioning and rely on administrators to manually review object modifications.
Answer:
B
Explanation:
Option A provides SSE-S3 encryption, which automatically encrypts objects at rest. However, SSE-S3 does not enforce customer-managed KMS key usage across multiple accounts, leaving potential compliance gaps. Relying on developers to manually enforce KMS usage introduces human error. SSE-S3 cannot prevent accidental or malicious deletions and lacks integrated real-time monitoring or automated remediation. Centralized auditing is also missing, making it difficult to ensure compliance across multiple regions. While easy to implement, this option does not meet the stringent enterprise-grade requirements for financial records.
Option B delivers a comprehensive and integrated approach. S3 Object Lock in compliance mode enforces WORM (Write Once, Read Many) immutability, preventing deletion or modification during the retention period. SCPs ensure all accounts use customer-managed KMS keys, enforcing consistent encryption compliance. EventBridge rules detect non-compliant objects and trigger automated remediation workflows, such as re-encryption or relocation to secure quarantine buckets, minimizing manual intervention. Bucket policies enforce least-privilege access, reducing insider threat risk. CloudTrail consolidates logs into a centralised audit account, providing complete visibility, enabling forensic investigations, and supporting regulatory compliance reporting. Preventive, detective, and corrective controls are integrated, ensuring enterprise-grade security, operational efficiency, and auditability across multi-account, multi-region environments.
Option C, manual encryption and monitoring, is reactive, labor-intensive, and prone to error. Objects may remain unencrypted for periods, exposing sensitive data. Manual compliance checks are inefficient and do not scale effectively across accounts and regions. Option D, using versioning and manual reviews, is reactive and operationally heavy. Versioning allows recovery of deleted objects but does not prevent deletions or enforce KMS key usage. Manual auditing is time-consuming and does not provide real-time enforcement or automated remediation.
Option B is the only approach that fully integrates preventive, detective, and corrective measures to meet all enterprise security requirements for S3, including encryption compliance, immutability, access control, automated remediation, real-time detection, and centralised auditing.
Question117:
A healthcare organization is migrating sensitive patient data to Amazon RDS. Security requirements include encryption at rest with customer-managed KMS keys, encryption in transit, strict identity-based access control, automated credential rotation, and centralised auditing of all database operations and configuration changes. Which solution best meets these requirements?
A) Enable RDS encryption with AWS-managed keys, grant developers full access, and use SSL/TLS connections.
B) Use customer-managed KMS keys for encryption, enforce SSL/TLS, implement IAM database authentication, rotate credentials automatically with AWS Secrets Manager, and enable CloudTrail logging.
C) Store database credentials in environment variables and rely on default encryption.
D) Enable point-in-time recovery and manually review logs periodically.
Answer:
B
Explanation:
Option A provides basic encryption with AWS-managed keys and SSL/TLS for data in transit. Granting full access to developers violates least-privilege principles and increases the risk of unauthorised access or accidental misuse of sensitive patient data. AWS-managed keys do not allow granular access control or detailed audit logging. Lack of automated credential rotation leaves credentials valid for long periods, creating potential security vulnerabilities. Centralized auditing is not implemented, reducing visibility and compliance capability. While simple to configure, Option A does not meet regulatory requirements for sensitive healthcare data.
Option B offers a comprehensive, enterprise-ready solution. Customer-managed KMS keys encrypt data at rest, enabling key rotation, granular access control, and auditability. SSL/TLS encrypts data in transit to protect against interception. IAM database authentication eliminates static credentials and enforces identity-based, least-privilege access. AWS Secrets Manager automates credential rotation, reducing risk and operational overhead. CloudTrail captures all database operations and configuration changes, enabling centralised auditing, forensic investigation, and regulatory compliance reporting. Option B fully integrates preventive, detective, and corrective controls to ensure sensitive patient records are secure, auditable, and compliant.
Option C, storing credentials in environment variables, exposes sensitive information and lacks automated rotation or centralised auditing. Option D, relying on point-in-time recovery and manual log review, is reactive, operationally intensive, and does not provide preventive or automated compliance measures.
Option B ensures encryption compliance, least-privilege access, automated credential management, and centralised auditing, fully meeting enterprise-scale security and regulatory requirements.
Question118:
A financial organization requires Amazon S3 storage for highly sensitive transactional data. Security requirements include immutability, prevention of accidental or malicious deletions, mitigation of insider threats, and comprehensive audit logging. Which solution satisfies these requirements?
A) Enable S3 versioning and rely on developers to prevent deletion.
B) Use S3 Object Lock in compliance mode, enforce bucket policies restricting access, and enable CloudTrail logging.
C) Maintain separate backups and manually track deletions.
D) Encrypt objects using SSE-S3 and allow developers to manage access manually.
Answer:
B
Explanation:
Option A, using versioning, enables recovery of deleted or modified objects but does not prevent deletions or modifications by privileged users. Relying on developers introduces operational risk and human error. Versioning alone does not guarantee immutability or provide centralised audit logging, both critical for regulatory compliance in financial environments.
Option B provides a comprehensive solution. S3 Object Lock in compliance mode ensures WORM immutability, preventing deletion or modification during a defined retention period. Bucket policies enforce least-privilege access, mitigating insider threats. CloudTrail logging captures all object-level operations, including attempted deletions or modifications, providing centralised , immutable audit trails for compliance and forensic investigations. Preventive controls (Object Lock, bucket policies), detective controls (CloudTrail), and corrective mechanisms (audit and remediation) are integrated, ensuring enterprise-grade security, operational efficiency, and regulatory compliance.
Option C, maintaining separate backups and manually tracking deletions, is reactive, labor-intensive, and error-prone. Option D, SSE-S3 encryption with manual access management, ensures confidentiality but does not enforce immutability or provide centralised auditing, leaving gaps in compliance and insider threat mitigation.
Option B is the only approach that satisfies all preventive, detective, and corrective requirements for secure, immutable, auditable storage of sensitive financial transactions.
Question119:
A healthcare organization processes sensitive patient data using AWS Lambda functions. Security policies require that Lambda invocations occur only through approved API Gateway endpoints and that all invocations are auditable. Which solution meets these requirements?
A) Allow all IAM users to invoke Lambda functions and rely on logging.
B) Attach resource-based policies to Lambda functions allowing invocation only from approved API Gateway principals and enable CloudTrail logging.
C) Store invocation secrets in environment variables for developers.
D) Protect Lambda functions with API keys and rely on developers not to share them.
Answer:
B
Explanation:
Option A allows unrestricted Lambda invocation and relies solely on logging, which provides no preventive control. Sensitive patient data could be exposed to unauthorised access, violating regulatory requirements. Option C exposes sensitive secrets in environment variables, offering no enforcement mechanism. Option D relies on API key secrecy, which is prone to accidental sharing or misuse, making it unreliable for sensitive workloads.
Option B enforces preventive access control via resource-based policies, restricting Lambda invocation to approved API Gateway principals. Unauthorised attempts are blocked automatically. CloudTrail logging captures all invocation events, providing centralised auditing, monitoring, and forensic capability. Preventive, detective, and corrective controls are integrated, ensuring compliance with healthcare regulations and secure handling of sensitive patient data. This solution balances operational efficiency, compliance, and security best practices, making it the optimal choice.
Question120:
A company operates multiple EC2 instances that access sensitive internal APIs. Security requirements include least-privilege access, centralised credential management, automated secret rotation, and auditable logs. Which solution satisfies these requirements?
A) Store API keys in environment variables and rotate manually.
B) Use AWS Systems Manager Parameter Store with SecureString parameters, assign IAM roles to EC2 instances to retrieve secrets, enable automated rotation, and monitor access with CloudTrail.
C) Hard-code credentials in applications and review logs weekly.
D) Use long-lived IAM user credentials for each EC2 instance.
Answer:
B
Explanation:
Option A exposes credentials in environment variables, lacks automated rotation, and increases operational risk. Option C relies on hard-coded, static credentials, which are difficult to rotate and audit. Option D uses long-lived IAM user credentials, creating a high risk of compromise and operational complexity.
Option B provides a secure, automated, and auditable solution. SecureString parameters encrypt credentials and enforce access control. IAM roles assigned to EC2 instances enforce least-privilege access, allowing only authorised instances to retrieve secrets. Automated rotation reduces exposure risk and operational burden. CloudTrail logs all access events, providing centralised auditing, monitoring, and forensic capability. Preventive, detective, and corrective controls are integrated, ensuring secure, auditable, and operationally efficient access to sensitive APIs. This approach satisfies all enterprise security and compliance requirements for managing sensitive credentials across multiple EC2 instances.
Risks Associated with Environment Variables
Option A, which involves storing API keys in environment variables and rotating them manually, presents multiple risks to both security and operations in cloud environments. Environment variables are convenient because applications can access them at runtime without hard-coding credentials. However, this convenience comes at a significant security cost. Environment variables exist in memory and can be read by any process with sufficient privileges on the same host. In multi-tenant EC2 instances or shared environments, this significantly increases the attack surface. Additionally, environment variables can inadvertently be exposed through logging or debugging activities. For example, if an application encounters a runtime error and logs environment information for debugging purposes, the API keys may be included in plain text, creating a channel for unauthorised access.
Manual rotation of credentials compounds these risks. Human-driven rotation is prone to mistakes, such as forgetting to rotate keys on schedule, failing to update all relevant instances, or misconfiguring access after rotation. In environments with large fleets of EC2 instances, coordinating manual rotation becomes operationally intensive and error-prone. Misaligned rotations can leave some instances using old credentials while others use new ones, introducing inconsistencies and increasing the potential for security gaps. This approach also lacks systematic auditability, making it difficult to demonstrate compliance with enterprise security policies or regulatory requirements. Organizations using manual rotations face challenges in providing evidence that credentials were rotated consistently and securely, which is critical for industries regulated under standards like PCI DSS, HIPAA, or ISO 27001.
Security Challenges of Hard-Coded Credentials
Option C, embedding credentials directly into application code, introduces a set of even more serious risks. Hard-coded credentials are effectively long-lived and static, remaining in deployed applications until explicitly changed. This creates persistent exposure. If credentials are ever leaked—whether through source code repositories, shared artifacts, or unencrypted backups—the same secret may exist in multiple environments, making revocation and rotation more complicated. Hard-coded secrets bypass centralised access controls, meaning there is no way to enforce least-privilege access dynamically.
Operationally, hard-coded credentials are difficult to rotate. Any change requires modifying the application code, testing, and redeploying the application across all instances using the credentials. This process is slow and introduces downtime risk, particularly in large-scale deployments. Additionally, hard-coded secrets make auditing nearly impossible, because there is no centralised mechanism to track who accessed the credentials or when. For enterprises handling sensitive data, this lack of traceability is a significant compliance risk. In regulated industries, auditors expect organizations to provide verifiable evidence that credentials are securely managed, rotated, and accessed in a controlled manner. Hard-coded credentials fail to meet these requirements, leaving organizations vulnerable to internal or external threats.
Limitations of Long-Lived IAM User Credentials
Option D, which relies on long-lived IAM user credentials for each EC2 instance, presents operational inefficiencies and high security risk. IAM users are primarily intended for human access and are not ideal for automated workloads. Long-lived credentials are difficult to rotate and can remain valid for months or years, increasing exposure if compromised. Managing a large number of IAM user credentials across hundreds or thousands of instances increases administrative burden and the potential for misconfiguration. Auditing is also complicated because actions performed using the IAM user credentials are attributed to a single identity, making it difficult to tie activity to a specific instance or application. This approach violates the principle of least privilege, and any compromise can lead to extensive damage, including unauthorised access to multiple systems. Operationally, administrators must manually monitor, rotate, and revoke credentials while ensuring that applications continue to function seamlessly, adding complexity and increasing the likelihood of error.
Advantages of Parameter Store SecureString Parameters
Option B offers a secure, automated, and auditable approach for managing credentials in EC2 environments. AWS Systems Manager Parameter Store supports SecureString parameters, which encrypt sensitive data using AWS Key Management Service (KMS). Encryption protects credentials both at rest and in transit, ensuring that even if storage is compromised, the secrets remain unreadable to unauthorised actors. SecureString parameters integrate with IAM, enabling fine-grained access control. Administrators can specify which IAM roles or users are permitted to retrieve specific secrets, enforcing least-privilege access policies. This centralised management eliminates the need for distributing static credentials across multiple instances and reduces the potential for human error or unauthorised access.
Role-Based Access Control with IAM Roles
Assigning IAM roles to EC2 instances is a fundamental part of Option B. IAM roles provide dynamic, temporary credentials for instances to access Parameter Store secrets. Only EC2 instances with the assigned role can retrieve the SecureString parameters. This enforces strict least-privilege access, ensuring that credentials are accessible only to authorised workloads. Roles can be centrally managed, updated, or revoked without modifying the application code or redeploying instances. This reduces operational complexity while maintaining strong security controls. Additionally, IAM roles facilitate temporary access management, which is particularly useful in dynamic cloud environments where workloads are frequently provisioned or decommissioned.
Automated Rotation Reduces Risk
Automated rotation of SecureString parameters is a key advantage of Option B. Credentials are rotated at regular intervals without manual intervention, minimizing the exposure window if a secret is compromised. This eliminates the need for manual rotation, reducing operational burden and the likelihood of errors. Applications retrieve the updated credentials dynamically at runtime, ensuring continuous access without downtime. Automated rotation also enhances compliance by demonstrating consistent and systematic security practices, which is essential for meeting regulatory requirements and internal enterprise policies.
Centralized Auditing and Monitoring with CloudTrail
CloudTrail integration provides centralised logging for all access to Parameter Store secrets. Every retrieval, modification, or rotation event is logged with details of the principal accessing the secret, the timestamp, and the specific resource involved. Centralized audit logs enable organizations to monitor for unauthorised access attempts, detect anomalies, and perform forensic investigations. In regulated industries, CloudTrail provides verifiable evidence of controlled access and compliance with standards such as PCI DSS, HIPAA, and ISO 27001. Auditability ensures accountability, helps detect insider threats, and provides a historical record to investigate any incidents, supporting both proactive security and compliance enforcement.
Integration of Preventive, Detective, and Corrective Controls
Option B integrates preventive, detective, and corrective security controls. Preventive controls are enforced via IAM roles and KMS encryption, blocking unauthorised access to credentials. Detective controls are implemented through CloudTrail logging, enabling real-time monitoring of access events and detection of anomalies. Corrective controls are supported because compromised credentials can be rotated immediately, and detailed audit logs provide actionable information for incident response. This layered approach ensures comprehensive protection throughout the lifecycle of the credentials, from creation to rotation, access, and revocation, mitigating risks proactively and enabling rapid response when necessary.
Operational Scalability and Enterprise Efficiency
Centralized management of credentials using Parameter Store improves operational efficiency and scalability. Administrators can manage all secrets from a single location, avoiding duplication across instances and reducing administrative overhead. Updates or revocations of credentials can be done centrally without redeploying applications. EC2 instances dynamically retrieve credentials at runtime, ensuring consistency and reducing the likelihood of human error. This approach scales effectively for enterprises managing hundreds or thousands of EC2 instances, providing secure, auditable, and consistent access to credentials across multiple workloads and environments.
Compliance and Regulatory Alignment
Option B aligns with enterprise security requirements and regulatory frameworks. By enforcing least-privilege access, encrypting credentials, enabling automated rotation, and centralizing audit logging, organizations can demonstrate strong governance and accountability. CloudTrail logs provide auditable evidence that sensitive credentials are accessed in a controlled manner, supporting compliance with HIPAA, PCI DSS, ISO 27001, and other industry standards. Organizations can also leverage these logs for internal security reviews, incident response, and forensic investigations, ensuring that preventive, detective, and corrective controls are in place and functioning effectively.
By leveraging Parameter Store SecureString parameters, IAM role-based access, automated rotation, and CloudTrail logging, organizations enforce preventive, detective, and corrective controls effectively. This approach strengthens security, ensures regulatory compliance, reduces operational complexity, and aligns with AWS best practices. It provides scalable, secure, and auditable access to sensitive APIs, reduces the risk of credential compromise, and improves overall operational resilience across EC2 workloads. Option B is clearly the optimal choice for enterprises that require centralised, automated, and compliant credential management across multiple EC2 instances, providing both security and operational efficiency at scale.