Amazon AWS Certified Security — Speciality SCS-C02 Exam Dumps and Practice Test Questions Set 4 Q46-60

Amazon AWS Certified Security — Speciality SCS-C02 Exam Dumps and Practice Test Questions Set 4 Q46-60

Visit here for our full Amazon AWS Certified Security — Specialty SCS-C02 exam dumps and practice test questions.

Question46:

A multinational financial organisation stores highly sensitive transactional data in Amazon S3 across multiple AWS accounts. Security requirements include organisation-wide enforcement of encryption using customer-managed KMS keys, prevention of unencrypted object uploads, least-privilege access for approved IAM roles, automated detection and remediation of non-compliant objects, and centralised audit logging. Which solution best satisfies these requirements?

A) Enable default SSE-S3 encryption on all buckets and rely on developers to ensure encryption during uploads.
B) Use AWS Organizations Service Control Policies (SCPs) to deny S3 PutObject requests unless the specified customer-managed KMS key is used, enforce bucket policies granting access only to approved IAM roles, configure EventBridge rules to detect unencrypted objects and trigger automated remediation, and consolidate CloudTrail logs into a centralised audit account.
C) Store unencrypted objects temporarily in S3 and manually encrypt them later.
D) Rely on developer discipline to monitor uploads and audit compliance periodically.

Answer:
B

Explanation:

In large-scale, multi-account AWS environments, safeguarding sensitive transactional data requires a holistic approach combining preventive, detective, and corrective controls with centralised auditability. Option A, which uses SSE-S3 default encryption and relies on developers, is insufficient. SSE-S3 encrypts objects at rest but does not allow granular control over key access, rotation, or usage. Developers may inadvertently misconfigure uploads, leaving data unencrypted or using the wrong key. Default encryption also cannot automatically detect or remediate non-compliant objects, which creates operational and compliance risks in complex environments.

Option B provides the most comprehensive solution. SCPs in AWS Organizations enforce organization-wide policies, denying PutObject requests unless the specified customer-managed KMS key is used, which prevents misconfigurations at the source. Bucket policies enforce least-privilege access, allowing only authorized IAM roles to upload or modify objects, reducing insider threat risk. EventBridge rules serve as a detective and corrective mechanism by identifying unencrypted or policy-violating uploads and triggering automated remediation, such as encryption, deletion, or alerts. Consolidated CloudTrail logs provide centralised visibility across all accounts and regions, capturing attempted and successful operations for audit, compliance, and forensic analysis. This integrated approach reduces operational overhead, ensures compliance with regulatory requirements, and provides organization-wide enforcement of encryption policies.

Option C, which relies on manual encryption of objects after upload, is reactive rather than preventive. Objects may remain exposed in plaintext for periods of time, increasing the risk of accidental exposure or malicious access. Manual remediation is inconsistent, error-prone, and operationally intensive, failing to meet regulatory and organizational requirements.

Option D relies solely on developer discipline and periodic audits, which is insufficient in multi-account, multi-region environments. Human error, oversight, or intentional circumvention can result in unencrypted data storage, non-compliance, and potential financial or reputational damage. Periodic audits are reactive, cannot prevent violations in real time, and are often labor-intensive, leading to operational inefficiencies.

Option B is the only solution that integrates preventive enforcement, least-privilege access control, automated remediation, and centralised auditing, fully meeting operational, security, and regulatory requirements for sensitive transactional data in a complex, multi-account environment.

Question47:

A healthcare organization stores sensitive electronic health records in Amazon RDS instances. Security requirements mandate encryption at rest and in transit, strict identity-based access controls, automated credential rotation, and centralised audit logging for all database operations and configuration changes. Which solution best satisfies these requirements?

A) Enable RDS encryption using AWS-managed keys, allow developers full access to databases, and enable SSL for database connections.
B) Use customer-managed KMS keys for RDS encryption, enable SSL/TLS for all database connections, enforce IAM database authentication, rotate credentials automatically using AWS Secrets Manager, and enable CloudTrail logging for all operations and configuration changes.
C) Store database credentials in environment variables and rely on default RDS encryption.
D) Enable point-in-time recovery on the RDS instance and manually review logs for auditing purposes.

Answer:
B

Explanation:

Option A provides only partial security. While AWS-managed keys encrypt data at rest and SSL/TLS protects data in transit, granting developers full access violates the principle of least privilege and increases the risk of unauthorized access. AWS-managed keys do not allow granular control over key rotation or access policies, which is essential for compliance with HIPAA and other healthcare regulations.

Option B fully satisfies all security and regulatory requirements. Customer-managed KMS keys allow granular control over key usage, rotation, and access policies. SSL/TLS ensures data in transit is protected from interception or tampering. IAM database authentication removes the need for static credentials, enforcing identity-based, least-privilege access. AWS Secrets Manager automates credential rotation, reducing risk of stale or compromised credentials. CloudTrail provides comprehensive logging of all RDS operations and configuration changes, supporting centralised auditing, compliance reporting, and forensic analysis. This combination of preventive, detective, and corrective controls ensures robust security and regulatory compliance.

Option C, storing credentials in environment variables, exposes sensitive credentials to potential leaks through logs, misconfigurations, or insider actions. Default encryption alone does not provide auditing, credential management, or identity-based access control, leaving critical gaps. Option D is reactive, relying on manual review of logs and point-in-time recovery. While useful for disaster recovery, it does not prevent unauthorized access or provide automated credential rotation or auditing.

Option B is the only solution that integrates encryption, automated credential management, identity-based access control, and centralised auditing, fully addressing healthcare regulatory requirements and security best practices.

Question48:

A financial services organization stores highly sensitive transactional data in Amazon S3. Security requirements include immutability for a specified retention period, prevention of accidental deletion, mitigation of insider threats, and comprehensive audit logging. Which solution best 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 for all object operations.
C) Maintain separate backups in S3 and manually track deletions.
D) Encrypt objects using SSE-S3 and allow developers to manage access manually.

Answer:
B

Explanation:

Option A, using versioning, allows recovery of previous object versions but does not prevent deletion or modification by privileged users. Relying on developers introduces human error and insider risk, failing to ensure regulatory compliance. Versioning alone does not satisfy requirements for immutability or auditable access.

Option B is the correct solution. S3 Object Lock in compliance mode enforces WORM (write-once-read-many) policies, preventing object modification or deletion for the retention period, even by administrators. Bucket policies implement least-privilege access, allowing only authorized personnel to access or manage objects. CloudTrail logging captures all object-level operations, including attempted deletions or modifications, providing a comprehensive audit trail for compliance reporting and forensic investigation. This integrated approach satisfies all preventive, detective, and corrective controls required for sensitive financial data.

Option C relies on manual backups and tracking, which is labor-intensive, error-prone, and reactive. It does not prevent deletions at the source and may fail to meet regulatory compliance. Option D, using SSE-S3 encryption with manual access management, protects confidentiality but does not enforce immutability, prevent deletion, or provide auditable logs, leaving gaps in compliance.

Option B is the only solution that ensures immutability, access control, insider threat mitigation, and comprehensive auditing, fully meeting regulatory and operational requirements.

Question49:

A healthcare organization uses AWS Lambda to process sensitive patient information. Security requirements mandate that Lambda functions be invoked only through approved API Gateway endpoints, direct invocation by internal personnel or other services must be blocked, and all invocation activity must be auditable. Which solution best satisfies these requirements?

A) Allow all IAM users to invoke Lambda functions and rely on logging for monitoring.
B) Attach resource-based policies to Lambda functions to allow invocation only from approved API Gateway principals, and enable CloudTrail logging for all invocations.
C) Store invocation secrets in environment variables and distribute them to developers.
D) Protect Lambda functions with API keys and rely on developers not to share them.

Answer:
B

Explanation:

Option A permits unrestricted invocation and relies on logging, which is insufficient for preventive control. Option C, storing secrets in environment variables, does not prevent unauthorized invocation and exposes sensitive information to misuse or accidental disclosure. Option D, using API keys, relies on secrecy and developer discipline, which is prone to risk if keys are mishandled or shared.

Option B enforces least-privilege access through resource-based policies, allowing invocation only from approved API Gateway endpoints. CloudTrail logging captures all invocations, successful and failed, providing a centralised audit trail for compliance reporting and forensic analysis. This approach integrates preventive, detective, and corrective controls, ensuring secure, auditable invocation of Lambda functions, preventing internal bypass, and meeting regulatory requirements for sensitive healthcare data. Option B adheres to AWS best practices for serverless security.

Question50:

A company operates multiple Amazon EC2 instances that access sensitive internal APIs. Security requirements include least-privilege access, centralised credential management, automated rotation of secrets, and auditable access logs. Which solution best satisfies these requirements?

A) Store API keys in environment variables and rotate them 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 using CloudTrail.
C) Hard-code credentials in application code on EC2 instances and review access logs weekly.
D) Use long-lived IAM user credentials for each EC2 instance.

Answer:
B

Explanation:

Option A exposes credentials to logs, misconfigurations, or insider actions. Manual rotation is error-prone and operationally intensive. Option C, hard-coding credentials, introduces risk and operational overhead for rotation, violating best practices. Option D relies on long-lived IAM user credentials, which are difficult to rotate, audit, and manage, increasing risk of compromise.

Option B provides a fully automated, secure solution. Parameter Store SecureString parameters store credentials securely, IAM roles enforce least-privilege access, automated rotation reduces risk of compromise, and CloudTrail captures all access events for centralised auditing and compliance. This solution integrates preventive, detective, and corrective controls while ensuring operational efficiency, regulatory compliance, and security best practices for sensitive API access. Option B aligns with AWS recommendations for centralised credential management and operational security.

Question51:

A multinational financial organization stores critical transactional data in Amazon S3 across multiple accounts and regions. Security and compliance requirements mandate organization-wide encryption using customer-managed KMS keys, prevention of unencrypted uploads, least-privilege access control for IAM roles, automated remediation of non-compliant objects, and centralised auditing. Which solution best satisfies these requirements?

A) Enable SSE-S3 encryption by default on all buckets and rely on developers to ensure encryption during uploads.
B) Use AWS Organizations Service Control Policies (SCPs) to deny S3 PutObject requests unless the specified customer-managed KMS key is used, enforce bucket policies granting access only to approved IAM roles, configure EventBridge rules to detect unencrypted objects and trigger automated remediation, and consolidate CloudTrail logs into a centralised audit account.
C) Store unencrypted objects temporarily in S3 and encrypt them manually later.
D) Rely solely on developer discipline to monitor uploads and audit compliance periodically.

Answer:
B

Explanation:

Option A provides baseline encryption using SSE-S3 but relies on human intervention to ensure compliance during uploads. Default encryption does not prevent misconfigurations, improper key usage, or accidental unencrypted uploads. AWS-managed keys lack granular control over access, key rotation, and auditing, making it unsuitable for highly regulated environments where organization-wide enforcement is required. The solution does not include mechanisms to automatically detect or remediate non-compliant objects, leading to operational risk and potential regulatory non-compliance.

Option B is the most robust solution. SCPs enforce preventive controls across all accounts, denying any S3 PutObject requests unless the correct customer-managed KMS key is used. This eliminates human error in encryption enforcement. Bucket policies ensure least-privilege access by allowing only authorized IAM roles to upload or modify objects, mitigating insider threats. EventBridge rules provide automated detection and remediation of non-compliant objects, such as unencrypted files, ensuring compliance in near real-time. Consolidated CloudTrail logs enable centralised auditing of all object-level operations, including attempts to bypass policies. This solution integrates preventive, detective, and corrective controls, ensuring comprehensive security, operational efficiency, and regulatory compliance for multi-account, multi-region environments.

Option C relies on manual encryption after object upload, which is reactive, error-prone, and operationally intensive. Objects may remain unencrypted and exposed for a period, increasing the risk of unauthorized access and non-compliance. Manual processes do not scale effectively in large, complex AWS environments. Option D is also insufficient, relying solely on developer discipline and periodic audits. Human error or malicious intent can result in unencrypted object uploads, creating compliance and operational risk. Audits alone are reactive and cannot prevent security incidents in real time.

Option B is therefore the only solution that provides comprehensive organization-wide encryption enforcement, automated remediation, least-privilege access, and centralised auditing, fully satisfying security, operational, and regulatory requirements.

Question52:

A healthcare organization uses Amazon RDS to store electronic health records. Security and compliance requirements include encryption at rest and in transit, automated credential rotation, strict identity-based access control, and centralised audit logging for all database operations and configuration changes. Which solution best satisfies these requirements?

A) Enable RDS encryption using AWS-managed keys, allow developers full database access, and enable SSL for connections.
B) Use customer-managed KMS keys for RDS encryption, enforce SSL/TLS connections, implement IAM database authentication, rotate credentials automatically using AWS Secrets Manager, and enable CloudTrail logging for all operations and configuration changes.
C) Store database credentials in environment variables and rely on default RDS encryption.
D) Enable point-in-time recovery and manually review logs periodically.

Answer:
B

Explanation:

Option A provides partial security. While AWS-managed keys encrypt data at rest and SSL/TLS protects data in transit, allowing developers full access violates the principle of least privilege, increasing the risk of unauthorized access and non-compliance. AWS-managed keys do not allow granular control over key usage, rotation, or access policies, which are critical for healthcare regulatory compliance such as HIPAA.

Option B meets all requirements. Customer-managed KMS keys allow full control over encryption at rest, including key usage policies, rotation schedules, and access permissions. SSL/TLS ensures secure transmission of data between clients and the database. IAM database authentication eliminates the use of static credentials, enforcing least-privilege, identity-based access control. Automated credential rotation with AWS Secrets Manager reduces the risk of compromised credentials. CloudTrail provides centralised auditing of all RDS operations and configuration changes, supporting compliance and forensic analysis. This solution integrates preventive, detective, and corrective controls, ensuring strong security, regulatory compliance, and operational efficiency.

Option C is risky because environment variables may expose credentials through logs or misconfigurations. Default encryption does not provide auditing, automated credential management, or identity-based access control. Option D, relying on point-in-time recovery and manual log review, is reactive, operationally intensive, and insufficient for regulatory compliance.

Option B is the only solution that fully integrates encryption, automated credential management, identity-based access control, and centralised auditing, satisfying regulatory and operational requirements for sensitive healthcare data.

Question53:

A financial organization stores highly sensitive transactional data in Amazon S3. Security requirements include immutability for a defined retention period, prevention of accidental deletion, mitigation of insider threats, and comprehensive audit logging. Which solution best 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 for all object operations.
C) Maintain separate backups in S3 and manually track deletions.
D) Encrypt objects using SSE-S3 and allow developers to manage access manually.

Answer:
B

Explanation:

Option A provides versioning, which allows recovery of previous object versions but does not prevent deletion or modification by privileged users. Relying on developers introduces human error and insider threats. Versioning alone cannot ensure regulatory compliance for immutability or auditable access.

Option B enforces write-once-read-many (WORM) immutability using S3 Object Lock in compliance mode, preventing any modification or deletion during the retention period. Bucket policies implement least-privilege access, limiting management to authorized personnel. CloudTrail logging captures all object-level operations, including attempts to modify or delete objects, providing a centralised audit trail for compliance and forensic analysis. This integrated approach satisfies preventive, detective, and corrective requirements for sensitive financial data, ensuring operational security and regulatory compliance.

Option C relies on manual backups and tracking, which is reactive, operationally intensive, and error-prone. It does not prevent deletions at the source and may fail regulatory compliance requirements. Option D, using SSE-S3 with manual access control, protects confidentiality but does not enforce immutability or provide auditable logs.

Option B is the only solution meeting all immutability, access control, insider threat mitigation, and audit requirements.

Question54:

A healthcare organization uses AWS Lambda to process sensitive patient information. Security requirements mandate that Lambda functions be invoked only through approved API Gateway endpoints, direct invocation by internal staff or other services must be blocked, and all invocation activity must be auditable. Which solution best satisfies 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 for all invocations.
C) Store invocation secrets in environment variables and distribute them to developers.
D) Protect Lambda functions with API keys and rely on developers not to share them.

Answer:
B

Explanation:

Option A provides unrestricted invocation and relies on logging for monitoring. While logs provide visibility, they do not enforce preventive control, which is critical for compliance and security. Option C, storing secrets in environment variables, does not prevent unauthorized invocation and risks exposure. Option D relies on API key secrecy, which is prone to accidental or malicious sharing and misuse.

Option B enforces least-privilege access through resource-based policies that permit invocation only from approved API Gateway endpoints. CloudTrail logging captures all invocation attempts, successful or failed, providing centralised auditing for compliance reporting and forensic investigation. This approach integrates preventive, detective, and corrective controls, ensuring secure and auditable Lambda invocation, preventing internal bypass, and meeting regulatory requirements. Option B aligns with AWS best practices for serverless security.

Question55:

A company operates multiple Amazon EC2 instances that access sensitive internal APIs. Security requirements include least-privilege access, centralised credential management, automated rotation of secrets, and auditable access logs. Which solution best satisfies these requirements?

A) Store API keys in environment variables and rotate them 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 using CloudTrail.
C) Hard-code credentials in application code on EC2 instances and review access logs weekly.
D) Use long-lived IAM user credentials for each EC2 instance.

Answer:
B

Explanation:

Option A exposes credentials through environment variables, logs, or misconfigurations, and manual rotation is error-prone and operationally intensive. Option C, hard-coding credentials, creates risk and operational overhead for rotation and audit. Option D, using long-lived IAM user credentials, is difficult to rotate, audit, or manage, increasing security risk.

Option B provides a secure, automated solution. Parameter Store SecureString parameters store credentials securely. IAM roles enforce least-privilege access. Automated rotation reduces risk of compromised secrets. CloudTrail logging captures all access events for centralised auditing, regulatory compliance, and forensic analysis. This solution integrates preventive, detective, and corrective controls, ensuring operational efficiency, regulatory compliance, and security best practices. Option B aligns with AWS recommendations for secure credential management in multi-instance EC2 environments.

Question56:

A multinational organization stores highly sensitive transactional data in Amazon S3 across multiple AWS accounts. Security requirements include organization-wide enforcement of encryption using customer-managed KMS keys, prevention of unencrypted object uploads, least-privilege access for approved IAM roles, automated detection and remediation of non-compliant objects, and centralised audit logging. Which solution best satisfies these requirements?

A) Enable default SSE-S3 encryption on all buckets and rely on developers to ensure encryption during uploads.
B) Use AWS Organizations Service Control Policies (SCPs) to deny S3 PutObject requests unless the specified customer-managed KMS key is used, enforce bucket policies granting access only to approved IAM roles, configure EventBridge rules to detect unencrypted objects and trigger automated remediation, and consolidate CloudTrail logs into a centralised audit account.
C) Store unencrypted objects temporarily in S3 and manually encrypt them later.
D) Rely solely on developer discipline to monitor uploads and audit compliance periodically.

Answer:
B

Explanation:

Option A provides encryption using SSE-S3 by default, but it relies heavily on human intervention to ensure compliance during uploads. Default encryption alone cannot prevent misconfigured uploads or enforce specific KMS keys, which are often mandated by regulatory or internal policies. AWS-managed keys lack detailed access controls, granular auditing, and automatic rotation, which are critical in environments that span multiple accounts and regions. Relying on developers to manage encryption introduces human error, which could result in unencrypted or incorrectly encrypted objects, posing significant compliance and security risks. Furthermore, SSE-S3 alone does not provide mechanisms for automated detection or remediation of non-compliant objects, leaving operational gaps.

Option B is the most comprehensive and suitable solution. Service Control Policies (SCPs) in AWS Organizations allow preventive enforcement at the account level, ensuring that any S3 PutObject requests failing to use the approved customer-managed KMS key are automatically denied. This prevents policy violations at the earliest point of access, ensuring organization-wide compliance. Bucket policies enforce least-privilege principles, allowing only approved IAM roles to upload, read, or modify objects. EventBridge rules detect unencrypted objects or violations in real-time and trigger automated remediation workflows, such as encrypting objects, alerting administrators, or removing non-compliant uploads. Consolidated CloudTrail logs into a centralised audit account, providing a complete, immutable record of all S3 operations, including attempted violations, enabling detailed auditing, compliance reporting, and forensic analysis. The combination of preventive, detective, and corrective controls ensures operational efficiency, regulatory compliance, and enhanced security across multiple accounts and regions.

Option C, storing unencrypted objects temporarily and manually encrypting them, is reactive, labor-intensive, and prone to errors. Objects may remain unencrypted for extended periods, increasing exposure risk. Manual remediation is inconsistent and difficult to scale across multiple accounts and regions, leaving gaps in security and compliance.

Option D relies entirely on developer discipline and periodic audits, which is insufficient for multi-account, multi-region environments with regulatory oversight. Human error, oversight, or intentional circumvention could lead to unencrypted data storage. Periodic audits are reactive and cannot prevent security incidents in real-time, making them unsuitable for enterprise-scale, high-compliance environments.

Option B is the only approach that integrates preventive enforcement, least-privilege access, automated remediation, and centralised auditing, fully meeting the operational, security, and regulatory requirements of a large-scale, multi-account organization.

Question57:

A healthcare organization stores sensitive electronic health records in Amazon RDS instances. Security requirements include encryption at rest and in transit, automated credential rotation, strict identity-based access control, and centralised audit logging of all database operations and configuration changes. Which solution best satisfies these requirements?

A) Enable RDS encryption using AWS-managed keys, allow developers full access to databases, and enable SSL connections.
B) Use customer-managed KMS keys for RDS encryption, enforce SSL/TLS connections, implement IAM database authentication, rotate credentials automatically using AWS Secrets Manager, and enable CloudTrail logging for all operations and configuration changes.
C) Store database credentials in environment variables and rely on default RDS encryption.
D) Enable point-in-time recovery and manually review logs periodically.

Answer:
B

Explanation:

Option A partially satisfies security requirements. While enabling RDS encryption with AWS-managed keys protects data at rest and SSL/TLS encrypts data in transit, allowing developers full access violates the principle of least privilege. AWS-managed keys do not allow granular access control or detailed auditing, making it insufficient for healthcare regulatory compliance, such as HIPAA. The solution lacks automated credential rotation and centralised audit logging, increasing operational and security risks.

Option B fully meets all requirements. Customer-managed KMS keys provide encryption at rest with granular access control, rotation policies, and auditability. Enforcing SSL/TLS for database connections secures data in transit from interception or tampering. IAM database authentication removes static credentials and ensures access is based on identity, supporting the principle of least privilege. AWS Secrets Manager automates credential rotation, reducing risk associated with stale or compromised credentials. CloudTrail logging captures all operations and configuration changes, providing centralised auditing, compliance visibility, and forensic capabilities. This integrated approach ensures preventive, detective, and corrective controls, operational efficiency, and regulatory compliance for sensitive healthcare data.

Option C, storing credentials in environment variables and relying on default encryption, exposes sensitive credentials to logs, misconfigurations, or insider misuse. Default encryption does not provide identity-based access control, automated rotation, or centralised auditing, leaving gaps in compliance and operational security. Option D, relying on point-in-time recovery and manual log review, is reactive, labor-intensive, and insufficient for regulatory compliance, as it does not prevent unauthorized access or enforce encryption and rotation policies.

Option B is the only solution that satisfies all preventive, detective, and corrective requirements while adhering to healthcare regulatory mandates and AWS best practices for database security.

Question58:

A financial organization stores highly sensitive transactional data in Amazon S3. Security requirements mandate immutability for a defined retention period, prevention of accidental deletion, mitigation of insider threats, and comprehensive audit logging. Which solution best 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 for all object operations.
C) Maintain separate backups in S3 and manually track deletions.
D) Encrypt objects using SSE-S3 and allow developers to manage access manually.

Answer:
B

Explanation:

Option A uses versioning to recover previous object versions, but it does not prevent deletion or modification by privileged users. Relying on developers introduces human error and increases the risk of insider threats. Versioning alone cannot satisfy regulatory requirements for immutable storage or auditable operations, making it insufficient for sensitive financial data.

Option B enforces WORM (write-once-read-many) immutability using S3 Object Lock in compliance mode, preventing any modifications or deletions during the retention period, even by administrators. Bucket policies enforce least-privilege access, ensuring only authorized personnel can manage objects, reducing insider threats. CloudTrail logging captures all object-level operations, including attempts to delete or modify objects, providing a centralised audit trail. This integrated approach addresses preventive, detective, and corrective controls, operational security, and regulatory compliance. The combination of Object Lock, access control, and logging ensures immutability, accountability, and auditability for highly sensitive data.

Option C relies on manual backups and tracking, which is reactive, labor-intensive, and error-prone. It does not prevent deletions at the source and may fail regulatory compliance requirements. Option D, using SSE-S3 encryption with manual access control, protects confidentiality but does not enforce immutability or provide auditable logs, leaving gaps in compliance and operational security.

Option B is the only solution that meets all requirements for immutability, access control, insider threat mitigation, and auditing, making it suitable for highly sensitive financial data environments.

Question59:

A healthcare organization uses AWS Lambda to process sensitive patient information. Security requirements mandate that Lambda functions can only be invoked through approved API Gateway endpoints, direct invocation by internal personnel or other services must be blocked, and all invocation activity must be auditable. Which solution best satisfies 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 for all invocations.
C) Store invocation secrets in environment variables and distribute them to developers.
D) Protect Lambda functions with API keys and rely on developers not to share them.

Answer:
B

Explanation:

Option A allows unrestricted invocation and relies on logging, which is insufficient for preventive security controls. Logging provides auditability but cannot prevent unauthorized or accidental invocations. Option C, storing secrets in environment variables, does not enforce access control and exposes secrets to potential misuse. Option D, using API keys, relies on secrecy and developer discipline, which is prone to human error or intentional sharing, creating security risks.

Option B enforces least-privilege access by attaching resource-based policies that allow invocation only from approved API Gateway principals. This preventive control ensures that unauthorized access attempts are automatically blocked. CloudTrail logging provides centralised auditing, capturing all invocation events, including successful and failed attempts, for compliance and forensic purposes. This solution integrates preventive, detective, and corrective controls, ensuring secure, auditable Lambda function execution. Option B adheres to AWS best practices for serverless security, minimizes insider threat risk, and meets regulatory compliance requirements for sensitive healthcare data.

Risks of Unrestricted Lambda Invocation

Option A, which allows all IAM users to invoke Lambda functions while relying solely on logging, introduces significant security risks. In a multi-user AWS environment, unrestricted invocation bypasses the principle of least privilege, exposing critical workloads to accidental or intentional misuse. Even trusted internal users could invoke functions inappropriately, causing operational disruption or unauthorized access to sensitive data. Relying only on logs, such as CloudTrail entries, is reactive rather than preventive. While logs provide visibility into actions taken, they do not block malicious or unintended invocations in real-time. This means that security violations or operational errors could occur before any detection, increasing risk and potential damage.

Limitations of Environment Variable Secrets

Option C proposes storing invocation secrets in Lambda environment variables and distributing them to developers. While Lambda environment variables can be encrypted with AWS KMS, this approach does not enforce who can invoke the function. Developers or other internal users who obtain the secret could bypass access controls, resulting in unauthorized function execution. Moreover, environment variables are often exposed accidentally through misconfigured logging, debugging output, or versioning operations. This method lacks centralised access management and auditing, making it difficult to enforce strict compliance requirements, particularly in regulated industries such as healthcare.

Challenges with API Key Protection

Option D relies on API keys to control access and depends on developers to safeguard them. API keys are inherently shared secrets, and human behavior introduces risk. Keys can be inadvertently disclosed, intentionally shared, or misused, particularly in collaborative development environments. API keys do not provide contextual restrictions such as source verification or identity-based access control, making them inadequate for enforcing least-privilege principles. While API keys can complement security measures, they cannot be the primary mechanism for controlling sensitive Lambda function invocations, especially in environments subject to strict regulatory oversight.

Advantages of Resource-Based Policies

Option B provides a comprehensive, secure, and auditable solution. By attaching resource-based policies to Lambda functions, administrators can explicitly define which API Gateway principals are permitted to invoke each function. This ensures that only approved services or clients can trigger function execution, preventing unauthorized access. Resource-based policies allow fine-grained control at the function level, providing a strong preventive mechanism that blocks invocations outside of approved channels.

Centralized Logging and Auditability

CloudTrail logging, when combined with resource-based policies, provides full auditability. Every Lambda invocation, including successful and failed attempts, is recorded in a centralised location. This allows security and compliance teams to monitor for unauthorized access, investigate potential incidents, and demonstrate compliance with regulatory requirements. Centralized logging supports forensic analysis in case of a breach or operational error, ensuring that organizations can trace actions back to the responsible principal.

Integration of Preventive, Detective, and Corrective Controls

Option B integrates the three core security controls: preventive, detective, and corrective. Preventive controls are enforced through resource-based policies, which block unauthorized access in real-time. Detective controls are implemented through CloudTrail logging, which captures invocation activity for analysis and alerts. Corrective capabilities are enabled because logs provide actionable information, allowing administrators to adjust policies, revoke access, or remediate misconfigurations quickly. This integrated approach ensures that security is proactive and responsive, reducing the risk of breaches or misuse.

Operational and Compliance Benefits

Using resource-based policies with CloudTrail simplifies operational management. Administrators can centrally define access for multiple Lambda functions and easily adjust permissions as application requirements evolve. This approach minimizes reliance on manual processes, such as distributing secrets or managing API keys, which are prone to human error. Furthermore, the combined use of resource-based policies and CloudTrail supports regulatory compliance, particularly in industries handling sensitive data like healthcare or finance. Organizations can provide auditors with clear evidence of controlled access, real-time monitoring, and detailed invocation histories.

Mitigating Insider Threats

Option B also addresses internal threats effectively. By enforcing least-privilege access and validating invocation sources, it limits the ability of insiders to misuse Lambda functions, intentionally or accidentally. In contrast, Options A, C, and D leave the organization vulnerable to internal misuse due to lack of strict controls, reliance on secrecy, or manual management processes. The structured policy and logging approach ensures that even privileged users cannot bypass security controls without detection.

Question60:

A company operates multiple Amazon EC2 instances that access sensitive internal APIs. Security requirements include least-privilege access, centralised credential management, automated rotation of secrets, and auditable access logs. Which solution best satisfies these requirements?

A) Store API keys in environment variables and rotate them 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 using CloudTrail.
C) Hard-code credentials in application code on EC2 instances and review access logs weekly.
D) Use long-lived IAM user credentials for each EC2 instance.

Answer:
B

Explanation:

Option A exposes credentials through environment variables, which can be inadvertently leaked via logs, misconfigurations, or insider misuse. Manual rotation is operationally intensive and error-prone. Option C, hard-coding credentials, introduces long-lived exposure and complicates rotation, violating security best practices. Option D uses long-lived IAM user credentials, which are difficult to rotate, audit, or manage securely, increasing the risk of compromise.

Option B provides a secure, automated solution. AWS Systems Manager Parameter Store SecureString parameters store credentials securely, ensuring encryption and controlled access. IAM roles assigned to EC2 instances enforce least-privilege access, preventing unauthorized retrieval of secrets. Automated rotation of secrets reduces the risk associated with credential compromise and ensures operational efficiency. CloudTrail logging captures all access events for centralised auditing, regulatory compliance, and forensic analysis. This approach integrates preventive, detective, and corrective controls while meeting operational, security, and compliance requirements for sensitive API access. Option B aligns with AWS best practices for centralized, automated, and auditable credential management.

Risks Associated with Environment Variables

Option A, which involves storing API keys in environment variables and rotating them manually, carries multiple security and operational risks. Environment variables, though convenient, can be inadvertently exposed through various channels. For instance, application crashes, debug logs, or process monitoring tools may output environment variables containing sensitive credentials. This can result in unintentional disclosure to developers or system administrators. Manual rotation, while conceptually improving security, is highly prone to human error. Administrators may forget to rotate keys on schedule, may rotate keys incompletely across all systems, or may misconfigure permissions after rotation. These shortcomings increase the likelihood of unauthorized access or operational disruption. In regulated environments, reliance on manual processes also complicates compliance, as auditors expect demonstrable automated controls over credential lifecycle management.

Challenges of Hard-Coded Credentials

Option C, which entails embedding credentials directly into application code, introduces even greater risks. Hard-coded secrets are extremely difficult to rotate because any update requires changes to the codebase, testing, and redeployment. This process is slow and error-prone, leaving the system vulnerable during periods when compromised credentials are still active. Furthermore, hard-coded credentials may be inadvertently exposed if code is stored in version control systems, shared among teams, or deployed to multiple environments. This practice bypasses centralised access control mechanisms and limits the organization’s ability to enforce least-privilege principles. As a result, hard-coded secrets significantly increase the attack surface and violate modern security best practices for managing sensitive data.

Limitations of Long-Lived IAM User Credentials

Option D, which relies on long-lived IAM user credentials for each EC2 instance, also introduces considerable operational and security risks. IAM users are primarily designed for human access, not automated processes. Long-lived credentials are difficult to rotate regularly, increasing the potential for exposure and compromise. If a credential is leaked or misused, revocation can be slow and cumbersome, potentially leaving the environment vulnerable for extended periods. Managing a large number of EC2 instances with individual IAM user credentials becomes operationally complex, and auditing each credential usage is difficult. This approach violates the principles of least privilege and centralised access control, making it an inferior option for secure, scalable secret management.

Advantages of Parameter Store SecureString Parameters

Option B offers a comprehensive solution by leveraging AWS Systems Manager Parameter Store with SecureString parameters. These parameters provide strong encryption using AWS KMS, ensuring credentials are securely stored both at rest and in transit. By assigning IAM roles to EC2 instances, access to secrets is tightly controlled and limited to authorized workloads, enforcing the principle of least privilege. This ensures that only intended instances can retrieve credentials, reducing the risk of misuse or accidental exposure.

Automated Rotation and Operational Efficiency

One of the key strengths of Parameter Store is automated secret rotation. Automated rotation eliminates the need for manual intervention, reducing human error and operational overhead. Credentials are periodically rotated without impacting running applications, minimizing the window of exposure in the event of compromise. This feature not only improves security posture but also streamlines operations, as administrators no longer need to coordinate complex manual rotation schedules across multiple systems.

Auditability and Compliance Benefits

CloudTrail logging provides a centralised mechanism to monitor all access to Parameter Store secrets. Every retrieval event is recorded with information about the requester, the timestamp, and the resource accessed. This centralised audit trail supports forensic analysis in case of security incidents, allows organizations to detect unauthorized access attempts, and satisfies regulatory compliance requirements such as PCI DSS, HIPAA, and ISO 27001. The ability to demonstrate controlled, auditable access to sensitive credentials is critical in highly regulated environments.

Integration of Preventive, Detective, and Corrective Controls

Option B combines preventive, detective, and corrective security controls into a single, integrated approach. Preventive controls are enforced through IAM role-based access and KMS encryption, ensuring unauthorized entities cannot access credentials. Detective controls are implemented through CloudTrail logging, enabling continuous monitoring and alerting of suspicious activities. Corrective measures are supported because administrators can immediately rotate compromised secrets and investigate access logs to remediate any misconfigurations. This layered security strategy ensures that credentials are protected proactively, monitored continuously, and remediated quickly when necessary.

Operational Scalability and Reliability

Using Parameter Store with IAM roles provides operational scalability. As the number of EC2 instances grows, administrators can grant access to secrets through roles instead of distributing individual credentials. This eliminates the need for manual secret distribution and reduces the risk of human error. Moreover, centralised management ensures consistency across environments, simplifying policy enforcement and reducing administrative burden. Applications can retrieve secrets dynamically at runtime, improving both security and reliability while ensuring minimal operational disruption.