AWS Certified Security – Specialty Practice Test – 75 Free Exam Questions with Answers

AWS Certified Security – Specialty

75 questions · instant answer feedback · concise explanations · free

  1. Question 1 of 75A financial firm receives a warning from the AWS Trust and Safety team about a potential security threat. An IAM access key linked to an IT administrator seems to have been compromised. This key is employed in an automated process that uses AWS Lambda functions to launch AWS Elastic Beanstalk environments. The firm's security engineer is tasked with addressing this security issue, preventing further use of the exposed access key, and bolstering security practices.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. Disable or delete the compromised IAM access key. Stop using static IAM access keys and instead, create a new IAM role for the Lambda automation process. Assign this role to the AWS Lambda functions. Respond to the AWS Trust and Safety team detailing the remediation actions.

    The best practice is to replace static IAM keys with an IAM role for Lambda. This eliminates long-term credentials. This option directly follows security best practices.

  2. Question 2 of 75A company has multiple accounts that are managed using AWS Organizations. A security engineer must setup a shared S3 bucket in a central account and grant read-only access for all users in any account within the AWS Organization. There should be no public access to the S3 bucket data. Which parameters should the security engineer use to accomplish this goal MOST efficiently?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. 1. Specify '*' as the principal and aws:PrincipalOrgld as a condition.

    Specifying '*' as the principal and aws:PrincipalOrgId as a condition allows any AWS principal access while restricting it only to accounts within the specified AWS Organization. Using the organization ID as a condition is more scalable and efficient than listing each account individually.

  3. Question 3 of 75A DevOps engineer has deployed several custom-built images provided by the development team using Amazon Elastic Container Service (ECS) with the Fargate launch type. The engineer now needs to aggregate the logs from all the containers into a pre-existing CloudWatch log group. Which solution will satisfy these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Enable the awslogs log driver by including awslogs-group and awslogs-region parameters in the LogConfiguration property.

    The awslogs log driver is the native and most efficient method for Fargate containers to send logs directly to a specified CloudWatch log group. The CloudWatch agent cannot be used on Fargate as it runs on a separate EC2 instance, which is not available in the Fargate launch type.

  4. Question 4 of 75A developer is deploying a website hosted in an Amazon S3 bucket. An Amazon CloudFront distribution will be deployed in front of the S3 bucket to cache the content. The developer requires that users may only access the website using the CloudFront distribution and should not be able to access the website directly by using the S3 URL. Which configurations should a security engineer make to support these requirements? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. Create an origin access identity (OAI) and associate it with the CloudFront distribution. · C. Configure the S3 bucket permissions so that only the origin access identity can access the bucket contents.

    Creating and associating an Origin Access Identity (OAI) with CloudFront and then configuring the S3 bucket policy to grant access only to that OAI ensures all requests must go through the CloudFront distribution. Direct S3 access is blocked because the OAI is not a standard AWS user.

  5. Question 5 of 75A company has several AWS accounts that use a combination of the following identity provider:

    Select 3 answers.

    Show answer & explanation

    Correct answer: F. Configure a password policy in Active Directory for the federation scenario. · G. Configure an IAM password policy for the IAM user scenario. · H. Configure a password policy in the Amazon Cognito user pool.

    Password policies must be configured at the source of the identity: Active Directory for federation, IAM for IAM users, and Cognito user pools for managed Cognito users. IAM policies do not apply to federated users, and Cognito identity pools are for temporary credentials, not user management.

  6. Question 6 of 75A developer who was recently fired by a company has a personal laptop that contains the SSH keys used to access multiple Amazon EC2 instances. The security team need to ensure the developer is unable to access the EC2 instances. How can a security engineer protect the running EC2 instances?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Connect to each EC2 instance and replace the public key information in the authorized_keys file.

    Connecting to the EC2 instance and editing the .ssh/authorized_keys file is the only way to revoke a compromised key. AWS does not provide a way to change an instance's key pair after it's launched; you must manage the keys at the operating system level.

  7. Question 7 of 75A company runs an application behind an Application Load Balancer (ALB). A security engineer has noticed many suspicious HTTP requests hitting the ALB. There is an Amazon CloudFront distribution in front of the ALB. Users are reporting performance problems. A security engineer discovers that the website is receiving a high rate of unwanted requests to the CloudFront distribution originating from a series of source IP addresses.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. Create an AWS WAF rate-based rule to block this traffic when it exceeds a defined threshold.

    AWS WAF rate-based rules are designed to automatically block IP addresses that exceed a configured request threshold in a 5-minute window, providing the least effort solution for mitigating suspicious traffic originating from a series of source IPs.

  8. Question 8 of 75A company requires that all traffic to a specific application is captured and inspected for network and security anomalies. The application runs on several Amazon EC2 instances. The detection software has been installed on an intrusion detection instance running on EC2. What should a security engineer do next to route traffic to the intrusion detection instance?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Configure VPC traffic mirroring to send traffic to the intrusion detection EC2 instance using a Network Load Balancer.

    VPC traffic mirroring is the correct AWS service to copy live network traffic from an elastic network interface and send it to a security appliance, such as an EC2-based intrusion detection system. This provides full packet capture for inspection.

  9. Question 9 of 75A company requires data encryption for sensitive data. The security has requested that the solution must allow cryptographic erasure of all resources protected by the encryption key within 15 minutes. Which AWS Key Management Service (AWS KMS) key solution will allow the security engineer to meet these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use imported key material with an AWS KMS key.

    Imported key material in AWS KMS can be deleted immediately, rendering the encrypted data cryptographically erased. Other key types require a waiting period of at least 7 days for scheduled deletion, which does not meet the 15-minute requirement.

  10. Question 10 of 75A financial services company has an organization in AWS organizations with several member accounts. Amazon S3 buckets are used to store sensitive data backups from common applications within each AWS account. The company needs to restrict users from deleting any S3 buckets or objects across the organization. What is the MOST scalable solution that meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Service Control Policies (SCPs)

    Service Control Policies (SCPs) in AWS Organizations provide a scalable way to apply permissions across all member accounts automatically. S3 bucket policies or ACLs would need to be configured on every bucket in every account, making them less scalable.

  11. Question 11 of 75A financial institution uses Amazon API Gateway to provide REST APIs for their mobile application. A data analyst wants to study the usage patterns of the APIs without having to sift through log files. Which pair of actions will fulfill these requirements with minimal effort? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: D. Enable access logging for the appropriate API stage. · E. Use Amazon CloudWatch Logs Insights for analyzing API usage data.

    Enabling access logging sends detailed request logs to CloudWatch, and CloudWatch Logs Insights provides powerful query capabilities to analyze the data without manual file parsing. This is more direct than using S3 and Athena or just CloudTrail.

  12. Question 12 of 75A bespoke application consisting of three tiers is being deployed in a VPC. You need to create three security groups. You have configured the WebSG (web server) security group and now need to configure the AppSG (application tier) and DBSG (database tier). The application runs on port 1030 and the database runs on 3306. Which rules should be created according to security best practice? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. On the DBSG security group, create a custom TCP rule for TCP 3306 and configure the AppSG security group as the source. · C. On the AppSG security group, create a custom TCP rule for TCP 1030 and configure the WebSG security group as the source.

    Application tier security group must allow traffic from the web tier on port 1030. Database tier security group must allow traffic from the application tier on port 3306. This follows the principle of least privilege.

  13. Question 13 of 75In response to an incident a security engineer locked down an Amazon S3 bucket with a policy that denies access to all users. Subsequently, the engineer attempted to grant access to a forensic analyst. After updating the bucket policy the forensic analyst still cannot access the bucket and is receiving access denied messages. What is the most likely explanation for the denial?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. An explicit deny will always override an explicit allow.

    An explicit deny in the bucket policy takes precedence over any new explicit allow statements, preventing access for the forensic analyst.

  14. Question 14 of 75A security team has requested that all existing and new Amazon RDS databases are encrypted at rest using AWS Key Management Service (KMS) encryption keys. A security engineer must identify which RDS databases are currently unencrypted and devise a plan for enabling encryption. Which combination of steps should the security engineer take to accomplish this? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: A. Use AWS Config to detect any existing and new unencrypted databases. Configure an Amazon SNS notification to alert the security team. · B. Create a snapshot of unencrypted databases. Copy the unencrypted snapshots to created encrypted snapshots. Restore the databases from the encrypted snapshots.

    AWS Config detects unencrypted RDS databases and SNS notifications alert the team. Creating an encrypted snapshot copy is the only way to enable encryption on an existing database, as direct encryption toggle is impossible.

  15. Question 15 of 75A healthcare organization is using Amazon EC2 instances to host an application that stores sensitive patient records. In compliance with healthcare regulations, the organization must restrict access to these records. A system engineer needs to establish a secure connection to the EC2 instances without opening any inbound ports, managing SSH keys, or maintaining bastion hosts. The organization also requires that all session activity logs are monitored, stored, and accessible in an encrypted format.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. Use AWS Systems Manager Session Manager to access the EC2 instances. Set up Amazon CloudWatch Logs for session logging. Choose the option to upload session logs and select the option to enforce encryption.

    AWS Systems Manager Session Manager provides secure access without SSH keys or bastion hosts. It logs sessions to CloudWatch Logs, and you can enforce encryption for these logs.

  16. Question 16 of 75A new application requires an AWS KMS key for encrypting sensitive data. The security policy requires that separate keys are used for different AWS services. How can the AWS KMS key be constrained to work with only Amazon S3?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Configure the key policy with a kms:ViaService condition key that limits use of the KMS key to the Amazon S3 service name.

    The kms:ViaService condition key restricts a KMS key to be used only by a specific AWS service. This is the correct way to separate keys by service.

  17. Question 17 of 75A company has deployed an organization in AWS Organizations with several member accounts. The security team requires that there is at least on AWS CloudTrail trail configured for all existing accounts and any accounts that are created in the future. The logs should be sent to a single centralized Amazon S3 bucket and administrators in member accounts should not be able to modify the configuration. Which actions should be taken to accomplish this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Create an organization trail in the management account and specify a central S3 bucket.

    An organization trail in AWS Organizations automatically configures CloudTrail in all accounts, sending logs to a central S3 bucket. This prevents member account admins from modifying the configuration.

  18. Question 18 of 75A fintech company has an application that relies on AWS Systems Manager Parameter Store for managing secure string parameters. This is done using the standard tier and an AWS Key Management Service (AWS KMS) custom-managed key for encryption and decryption. Upon attempting to modify a parameter, the team has been encountering a series of error messages.

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. The state of the customer-managed key specified within the application is set to 'Disabled'. · D. The application lacks the kms:Encrypt permission for the custom-managed key.

    Parameter Store needs kms:Encrypt permission to use a CMK. If the key is disabled, it cannot encrypt data, causing errors. Both are valid causes for the issue.

  19. Question 19 of 75A company has four private subnets within a VPC. Two of the subnets are used for running database instances and the other two are used for application instances. Separate route tables are used for the database and application subnets. A NAT gateway is defined in the route tables to provide internet connectivity for the subnets. The security team requires that the database subnets should not have internet access. A security engineer must remove internet connectivity for the database subnets without affecting the application subnets.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. Modify the route table of the database subnets to remove the default route to the NAT gateway.

    The correct approach is to remove the 0.0.0.0/0 route to the NAT gateway from the database subnets' route table. Network ACLs and modifying the NAT gateway itself are incorrect methods.

  20. Question 20 of 75A security engineer is attempting to setup automatic notifications that alert administrators about any changes that are made to an Amazon S3 bucket. The engineer has configured AWS Config and created an SNS topic. Changes have been made to the S3 bucket, but the SNS notifications have not been sent. Which combination of steps should the security engineer take to resolve the issue? (Select THREE.)

    Select 3 answers.

    Show answer & explanation

    Correct answer: B. Configure the trust policy on the IAM role AWS Config uses to allow "config.amazonaws.com" to assume the role. · D. Configure the role policy on the IAM role AWS Config uses to allow write access to the Amazon S3 bucket. · E. Configure the access policy for the Amazon SNS topic to allow "sns:publish" access to "config.amazonaws.com".

    The IAM role for AWS Config must trust config.amazonaws.com and have permissions to write to the S3 bucket. The SNS topic policy must allow config.amazonaws.com to publish, not sns:write.

  21. Question 21 of 75A company is extending a secure development environment from an on-premises data center into AWS. They have secured the VPC by removing the Internet Gateway and configuring security groups and network ACLs. An AWS Direct Connect connection has been established between the data center and the Amazon VPC. What else needs to be done to add encryption in transit?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Setup a Virtual Private Gateway (VGW).

    AWS Direct Connect does not provide encryption. A Virtual Private Gateway (VGW) must be set up to enable a Site-to-Site VPN connection over the Direct Connect link for encryption.

  22. Question 22 of 75A company manages all access to Amazon S3 buckets using identity-based policies. A security engineer needs to receive an alert if any user adds a bucket policy to any Amazon S3 bucket. Which approach meets the requirements MOST efficiently?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create an Amazon EventBridge rule uses the "AWS API Call via CloudTrail" event source and the "s3:PutBucketPolicy" event pattern. Generate an alert using Amazon SNS.

    EventBridge is the ideal service for detecting the s3:PutBucketPolicy API call via CloudTrail and triggering an SNS alert. This is a direct and efficient event-driven solution.

  23. Question 23 of 75A company has thousands of employees that use a single Microsoft Active Directory on-premises identity provider. The company is deploying several dozen AWS accounts and needs to provide its employees with access to the AWS accounts. The solution should maximize scalability and operational efficiency. Which solution meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Create a landing zone using AWS Control Tower. Integrate AWS Single Sign-On (SSO) with the company's existing identity provider. Grant Active Directory users access to accounts and applications.

    AWS Control Tower and AWS SSO provide a centralized, scalable solution to federate on-premises AD and grant users access to multiple AWS accounts.

  24. Question 24 of 75A static website runs on an Amazon EC2 instance. The security engineer has been asked to suggest improvements to mitigate the risk of DDoS attacks. Which of the following may assist with this goal? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. Use the AWS Web Application Firewall (WAF) service to inspect and manage web requests. · E. Migrate the static content to an Amazon S3 bucket and create an Amazon CloudFront distribution.

    WAF can inspect and block malicious web traffic to mitigate DDoS attacks. Migrating content to S3 with CloudFront adds AWS Shield Standard, which helps with DDoS protection.

  25. Question 25 of 75A company is archiving sensitive data to Amazon S3 Glacier. A security engineer has created a new vault lock policy for 1 TB of data and called the initiate-vault-lock operation 8 hours ago. When reviewing the policy the security engineer noticed and error that should be corrected. What is the MOST cost-effective method of correcting the error?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Call the AbortVaultLock operation. Update the policy. Call the initiate-vault-lock operation again.

    Once a Glacier vault lock is in progress, it must be aborted with AbortVaultLock before the policy can be corrected. This is a required step in the locking process.

  26. Question 26 of 75A company is using AWS CloudTrail is being used to monitor API calls. An audit revealed that CloudTrail is failing to deliver events to Amazon S3 as expected. A security engineer is attempting to resolve the issue. What initial actions should be taken to allow delivery of CloudTrail events to S3? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: D. Verify that the S3 bucket and prefix defined in CloudTrail exists. · E. Verify that the S3 bucket policy grants CloudTrail the s3:PutObject permission.

    The correct answers identify the core requirements: a valid S3 location for the log files and the proper IAM permissions via the bucket policy. This avoids common mistakes like confusing IAM roles with service principals or relying on bucket ACLs.

  27. Question 27 of 75A security team are designing a plan to respond to incidents of compromised Amazon EC2 instances. The incident response plan should include the automated provisioning of a secure forensic environment and orchestration of incident response processes. Which AWS services should be included in the plan? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: A. AWS CloudFormation · C. AWS Step Functions

    CloudFormation automates the setup of the secure forensic environment, and Step Functions orchestrates the incident response workflow. This directly addresses the automation requirement, unlike services like GuardDuty which only detect threats.

  28. Question 28 of 75A developer who recently left a company was found to have published many access keys IDs to a public source code repository. A list of the exposed access key IDs has been created. A security engineer needs to quickly identify which users the access key IDs belong to so the credentials can be immediately rotated. The company uses multiple accounts in an AWS Organization. Which approach should the security engineer take?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Generate a credential report in each account in the Organization. Consolidate the reports and identify the users the access key IDs belong to. Rotate the access key IDs.

    IAM Access Analyzer is for resource sharing, not for finding compromised credentials. You must generate a credential report in each account because reports are scoped to a single account, not an entire organization.

  29. Question 29 of 75A security engineer needs to automate SSH key pair management for many Amazon EC2 instances. The security engineer must create a solution that automatically stores and rotates SSH key pairs that are more than 90 days old. There must also be an audit trail of the rotation recorded in an Amazon S3 bucket. Which solution that meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use AWS Secrets Manager to store the SSH key pairs. Create an AWS Lambda function that rotates the SSH keys every 90 days. Create an AWS CloudTrail trail that logs to an S3 bucket.

    Secrets Manager with a Lambda function provides the rotation logic required for SSH keys, which isn't available through its built-in automatic rotation feature. CloudTrail is needed for the audit trail, as Secret Manager doesn't provide S3 audit logs itself.

  30. Question 30 of 75An application runs on Amazon EC2 instances that use an Amazon SQS queue and an Amazon DynamoDB table. The application processes highly confidential information and the connectivity between these AWS services should be private. Which combination of steps should the security engineer take to meet this requirement? (Select THREE.)

    Select 3 answers.

    Show answer & explanation

    Correct answer: A. Modify the endpoint policies on all VPC endpoints. Specify the SQS and DynamoDB resources that the application uses. · C. Create an interface VPC endpoint for Amazon SQS. · D. Create a gateway VPC endpoint for Amazon DynamoDB.

    VPC endpoints provide private connectivity within the VPC without exposing resources to the internet. Using interface and gateway endpoints and their policies ensures private, secure communication for SQS and DynamoDB.

  31. Question 31 of 75An Amazon EC2 instance requires permissions to read and write data in an Amazon S3 bucket. A security engineer is creating an IAM role that will be assumed by the EC2 instance. When creating the role using the AWS CLI create-role command, which policy must be added to allow the instance to assume the role?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Trust policy

    A trust policy defines which principals can assume the role, which is a core requirement when an EC2 instance needs to assume an IAM role. Inline and managed policies grant permissions, but the trust policy enables the assumption.

  32. Question 32 of 75A security engineer requires a solution for allowing employees to connect to a command line interface on Amazon EC2 Linux instances without using SSH keys or ports. Which solutions meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use AWS Systems Manager Session Manager. Grant the IAM user accounts permissions to use Systems Manager Session Manager.

    Session Manager provides secure, auditable CLI access without opening SSH ports or managing keys. This directly meets all requirements, unlike Run Command, bastion hosts, or Secrets Manager.

  33. Question 33 of 75A security engineer received a notification that an administrative user account may have been compromised. The engineer wants to immediately rotate the access key for the user whilst ensuring that applications that use the access key are not affected. What is the BEST approach in this situation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a second access key and modify applications to use the new key. Disable the old access key and check applications are working correctly before deleting the old access key.

    Creating a second key first allows for a safe, phased rotation. It prevents breaking applications by enabling you to disable the old key and test with the new one before removing the old one completely.

  34. Question 34 of 75A company has created an organization within AWS Organizations. A security engineer created an organizational unit (OU) and moved several AWS accounts into the OU. The Amazon EC2 service is restricted with the following SCP:

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: F. Create a new OU without the SCP restricting EC2 access. Move the data analytics account to the new OU.

    An explicit deny in an SCP overrides any allow, and the root user is also restricted. The only way to grant access is to place the account in an OU without the deny policy. The trap is an allow statement with conditions, which are invalid in SCPs.

  35. Question 35 of 75A security engineer is troubleshooting a connectivity issue with an Amazon EC2 Linux instance. The engineer is trying to connect from the internet, but the connection attempt times out. Other instances in the VPC are contactable over the internet. Which of the following could be causes of this issue? (Select THREE.)

    Select 3 answers.

    Show answer & explanation

    Correct answer: A. The network ACL denies outbound traffic on ephemeral ports. · B. The route table of the subnet is missing a route to the internet gateway. · D. The host-based firewall of the instance operating system is denying traffic.

    The VPC route table for the instance's subnet must direct internet traffic to the gateway. Network ACLs are stateless and can block return traffic, and a host firewall can also block connections. The elimination cue is that security groups are stateful and automatically allow response traffic.

  36. Question 36 of 75A security architect is designing a highly secure application and must determine the best solution for storage of encryption keys. The encryption keys must be accessible only from within a VPC on single-tenant hardware security modules (HSMs). The solution must also include access logging and high availability. Which of the following services meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. AWS CloudHSM.

    CloudHSM provides single-tenant HSMs within a VPC, satisfying the requirement for on-premise-like key management with access logging and high availability. The exam differentiates this from KMS, which is multi-tenant.

  37. Question 37 of 75A company is experiencing a layer 3 and layer 4 DDoS attack on its web servers running on AWS. Which combination of AWS services and features will provide protection in this scenario? (Select THREE).

    Select 3 answers.

    Show answer & explanation

    Correct answer: B. Amazon Route 53 · C. Elastic Load Balancer · F. AWS Shield

    AWS Shield provides L3/L4 DDoS protection, Route 53 handles DNS-based attacks and scales traffic, and ELB distributes traffic to prevent instance overload. GuardDuty is for detection, not protection.

  38. Question 38 of 75A company requires that only trusted code can be deployed to AWS Lambda functions. A method of validating the integrity of the code should be implemented and developers should not be able to bypass the solution. Which combination of steps should a security engineer take to meet these requirements? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. Use AWS Signer to verify code integrity when code packages are deployed to Lambda. · D. Use IAM policies to enforce that developers can only create functions that have code signing enabled.

    AWS Signer verifies code integrity, and IAM policies can enforce that functions require code signing, preventing developers from bypassing the check. The exam requires both validation and enforcement.

  39. Question 39 of 75A company has a serverless application that is accessed by internal users. The application consists of an AWS Lambda function that accesses an Amazon DynamoDB table. The security team are concerned that the Lambda function has internet access and the endpoints for Lambda and DynamoDB are both public. How can a security engineer improve the security of the application? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: A. Configure the Lambda function to connect to private subnets in an Amazon VPC. · B. Configure a VPC endpoint for accessing the DynamoDB table using private addresses.

    Placing Lambda in private subnets and using a VPC endpoint for DynamoDB secures the application by removing public internet access. The key is using a VPC endpoint, which is not the same as DynamoDB connecting to a subnet.

  40. Question 40 of 75An application running on Amazon EC2 instances reads secrets stored in AWS Systems Manager Parameter Store. The application issued GetParameter API calls for secure string parameters and the calls failed. Which factors could be the cause of this failure? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: C. The IAM role assigned to the EC2 instance profile does not have permissions to retrieve parameters in Systems Manager Parameter Store. · E. The IAM role assigned to the EC2 instance profile does not have decrypt permissions on the AWS KMS key used to encrypt the parameter.

    Reading a secure string requires SSM GetParameter and KMS Decrypt permissions on the IAM role. The trap is confusing who needs the KMS permission.

  41. Question 41 of 75A website runs on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB) which serves as an origin for an Amazon CloudFront distribution. An AWS WAF is being used to protect against SQL injection attacks. A review of security logs revealed an external malicious IP that needs to be blocked from accessing the website. What steps should be taken to protect the application?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Modify the configuration of AWS WAF to add an IP match condition to block the malicious IP address.

    AWS WAF is the correct location for blocking specific IPs as it's designed for web application firewalling. Security groups can't have deny rules, and the ALB sees traffic from the WAF, not the client's original IP address.

  42. Question 42 of 75A company has a critical web application running on a fleet of auto scaling Amazon EC2 instances behind an Application Load Balancer (ALB). The ALB is associated with an AWS WAF web ACL. The security team has identified suspicious port scans coming from a specific range of internet IP addresses. A security engineer needs to block access from the identified addresses. Which solution meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Modify the web ACL with an IP set match rule statement and a block action to deny incoming requests from the IP address range.

    The IP set match rule in WAF is designed specifically for blocking requests from a list of IP addresses. A rate-based rule is for throttling traffic by volume, not by source IP.

  43. Question 43 of 75A company enforces encryption for all Amazon EBS volumes. Following security incidents, EBS snapshots sometimes need to be shared with a forensics account for analysis. The security team must ensure the volumes remain encrypted as much as possible throughout the process. Which steps are required to share the encrypted snapshots with least privilege?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Share an encrypted snapshot, use a customer managed KMS key, and allow the Decrypt and CreateGrant actions for the target account in the key policy.

    Shared encrypted snapshots require a customer managed KMS key. The key policy must grant the target account Decrypt and CreateGrant actions for re-encryption. The trap is using an AWS managed key, which cannot be shared across accounts with fine-grained permissions.

  44. Question 44 of 75A healthcare institution has developed a cloud-based application that collects and stores confidential patient records in an Amazon DynamoDB table. They need to adopt a solution that ensures end-to-end data protection and the ability to identify any unauthorized changes to the data. What solution would cater to these needs?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use the DynamoDB Encryption Client for client-side encryption and to digitally sign the table items.

    Client-side encryption with the DynamoDB Encryption Client provides end-to-end protection and digital signatures to detect data tampering. The trap is KMS, which only encrypts at rest and does not provide integrity checks.

  45. Question 45 of 75A FinTech company wants to shield its online banking portal from man-in-the-middle attacks, and it's using Amazon CloudFront for content delivery. What would be the most effective method to accomplish this goal with minimal administrative intervention?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Use the SecurityHeadersPolicy managed response headers policy.

    The SecurityHeadersPolicy managed policy enforces security best practices like HSTS with minimal overhead. The trap is using Lambda@Edge, which works but adds unnecessary complexity for a standard requirement.

  46. Question 46 of 75An e-commerce company receives an AWS Abuse notification stating that an IAM user's access key, used by an inventory management system, may have been compromised. The security manager needs to address the potential security breach while ensuring minimal service interruption to the inventory system. What would be the optimal strategy to address this situation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Generate a new access key for the IAM user. Update the inventory management system to utilize the new access key. Subsequently, deactivate the compromised access key.

    Generating a new key and updating the app first avoids downtime. The trap is deleting the key immediately, which would break the application until the new key is configured.

  47. Question 47 of 75A multinational corporation has a diversified range of services deployed on Amazon EC2 instances. The company has AWS Systems Manager Agent (SSM Agent) installed on their EC2 instances and utilizes AWS Security Hub for consolidating their security alerts and findings. The company uses AWS Organizations with numerous managed AWS accounts. They wish to regularly monitor their workloads for potential software vulnerabilities and unexpected network exposure.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Designate a delegated administrator for Amazon Inspector for the entire organization. Set up automatic scanning for all existing and new member accounts.

    Amazon Inspector is the service for vulnerability scanning. A delegated administrator automatically enables scanning across all organization accounts.

  48. Question 48 of 75A financial institution employs an on-premises hardware security module (HSM) to generate and administer its encryption keys, according to its stringent security policies. Their transaction processing application uses Amazon RDS to store data, and all data must be encrypted at rest. A security specialist has generated an encryption key using the on-premises HSM.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Create a new customer-managed key in AWS KMS and import the new key material. Provide Amazon RDS permissions to use the key. Create a new RDS instance and choose the new key as the encryption key. Migrate the data into RDS.

    You can only import key material into customer-managed KMS keys, not AWS-managed ones. This allows you to use an external HSM for RDS encryption.

  49. Question 49 of 75A security engineer has been asked to review an Amazon S3 bucket policy to determine if the data is properly secured against public access. The policy statement is as follows:

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. The S3 bucket ACL and object ACLs will need to be checked to determine if public access is possible.

    S3 bucket policies can be overridden by bucket or object ACLs, which must also be checked to ensure no public access is granted. The exam rule is to check all policy layers for public access, not just the bucket policy.

  50. Question 50 of 75A new employee is joining a security team. The employee initially requires access to manage Amazon DynamoDB, Amazon RDS, and Amazon CloudWatch. All security team members are added to the security team IAM group that provides additional permissions to manage all other AWS services. The team lead wants to limit the permissions the new employee has access to until the employee takes on additional responsibilities, and then be able to easily add permissions as required, eventually providing the same access as all other security team employees.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. Create an IAM account for the new employee and add the account to the security team IAM group. Set a permissions boundary that grants access to manage Amazon DynamoDB, Amazon RDS, and Amazon CloudWatch. When the employee takes on new management responsibilities, add the additional services to the permissions boundary IAM policy.

    Permissions boundaries allow a user to stay in the group while limiting their permissions. It's more efficient than creating separate groups for limited access.

  51. Question 51 of 75The security department in a company requires automatic discovery of any security groups that allow unrestricted inbound traffic on port 22 (SSH). The security administrators should be notified of any violations Which solution meets these requirements with the MOST operational efficiency?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Configure the restricted-ssh managed rule in AWS Config. When the rule is NON_COMPLIANT, use the AWS Config remediation feature to publish a notification to an Amazon SNS topic.

    AWS Config's 'restricted-ssh' managed rule is designed specifically for this purpose, offering a low-overhead way to detect and remediate non-compliant security group configurations.

  52. Question 52 of 75A company currently manages Amazon EC2 instances running Windows and Linux in public and private subnets. The operations team currently connects over the Internet to manage the instances as there is no private connection to the corporate network. Security groups have been updated to allow the RDP and SSH protocols from any source IPv4 address. There have been reports of malicious attempts to access the resources and the company wishes to implement the most secure solution for managing the instances.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Deploy the AWS Systems Manager Agent on the EC2 instances. Access the EC2 instances using Session Manager restricting access to users with permission to manage the instances.

    Systems Manager Session Manager provides secure, auditable access without exposing RDP or SSH ports, making it the most secure solution for managing instances remotely.

  53. Question 53 of 75A company has created an AWS account structure with a centralized management account and several child accounts. An AWS Organization has been created to manage this configuration. The security team require API auditing using AWS CloudTrail for all accounts. Administrators in child accounts should not have privileges to modify the CloudTrail trail configuration. How should AWS CloudTrail be configured with the LEAST operational overhead?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Create an Amazon S3 bucket in the management account and create an Organization trail in the management account that logs to the S3 bucket.

    An organization trail in the management account logging to a single S3 bucket provides centralized auditing with minimal overhead.

  54. Question 54 of 75A security engineer must configure AWS WAF to store logs in a central location for later analysis. What is the MOST operationally efficient solution that meets this requirement?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Configure AWS WAF to send its log files directly to an Amazon S3 bucket for later analysis.

    WAF can send logs directly to S3, which is the most operationally efficient method for long-term storage without additional services.

  55. Question 55 of 75An application runs across multiple Amazon EC2 instances in multiple Availability Zones behind an Application Load Balancer (ALB). The application is experiencing a DDoS attack from malicious software that is distributed across hosts around the world. The software can be identified in the User-Agent field of the request header. A security engineer needs to mitigate the attack. Which actions should be taken?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Create a Web ACL with a string match condition that matches the value in the User-Agent header. Configure WAF to block requests that match the condition.

    AWS WAF's string match condition is designed to inspect request headers like User-Agent and block based on their content, mitigating Layer 7 attacks.

  56. Question 56 of 75A company runs an ecommerce website and is concerned about the risk of DDoS attacks. The company needs to identify methods to minimize the downtime associated with any attacks that might happen in the future. Which steps would help achieve this? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. Subscribe to AWS Shield Advanced and reach out to AWS Support in the event of an attack. · D. Create rule statements in AWS WAF web ACLs to block matching requests relating to the attack traffic.

    AWS Shield Advanced provides expert DDoS mitigation and support, while AWS WAF gives you the granular control to block malicious traffic. GuardDuty is for detection, not blocking, and VPC Flow Logs don't auto-remediate.

  57. Question 57 of 75A company manages an application that runs on Amazon EC2 instances behind a Network Load Balancer (NLB). The NLB has access logs enabled which are being stored in an Amazon S3 bucket. A security engineer requires a solution to run ad hoc queries against the access logs to identify application access patterns. How should the security engineer accomplish this task with the least amount of administrative overhead?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Create an Amazon Athena table that uses the S3 bucket containing the access logs. Run SQL queries using Athena.

    Athena is the most direct, serverless service for running ad-hoc SQL queries on data stored in S3 with minimal setup. The other options require more complex scripting or data movement.

  58. Question 58 of 75A company has deployed an application on Amazon EC2 instances with an Amazon RDS database. A security architect needs a secure solution for storing the database credentials and enabling automatic rotation on a regular basis. The credentials must be encrypted both in transit and at rest. Which solution meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use AWS Secrets Manager and configure automatic rotation of the credentials.

    Secrets Manager is the dedicated AWS service for secure credential storage and automatic rotation for databases like RDS, with encryption in transit and at rest built-in.

  59. Question 59 of 75A security engineer is deploying a proxy server solution in an Amazon VPC. The engineer has deployed proxy software on multiple EC2 instances across Availability Zones. Route tables have been configured to forward traffic to the proxy instances. The proxy instance security groups have been configured to allow ports 80 and 443 inbound and outbound. Upon testing the solution the engineer has discovered that the proxy instances are not forwarding traffic to the internet.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Disable source/destination checks on the EC2 proxy instances.

    Proxy servers must disable source/destination checks to act as a middleman, forwarding traffic that is not addressed to the instance itself. This is a fundamental networking configuration.

  60. Question 60 of 75An application running on Amazon EC2 instances generates log files in a folder on the Linux file system. The security team requires that the logs are collected and centrally stored using an AWS managed service. Automatic monitoring should be possible, and an interface must be available for analyzing the log files. Which approach meets the stated requirements with the minimum effort?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Install the unified Amazon CloudWatch agent on the EC2 instances. Configure the agent to collect the application log files and send them to Amazon CloudWatch Logs.

    The unified CloudWatch agent is the standard AWS-managed solution for collecting logs from EC2 instances and sending them to CloudWatch Logs for analysis with minimal effort.

  61. Question 61 of 75An enterprise has two VPCs in the ap-south-1 Region: vpc-alpha and vpc-beta. The enterprise has recently created an Amazon API Gateway REST API with the endpoint type set to PRIVATE. It also created a VPC endpoint for the REST API in vpc-alpha, providing the resources in vpc-alpha successful access to the REST API. The enterprise wants to allow resources in vpc-beta to access the REST API. A VPC endpoint for the REST API was created in vpc-beta, but the resources in vpc-beta still can't access the REST API.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: F. Maintain the API endpoint type as PRIVATE. Attach a resource policy to the REST API permitting access from vpc-beta.

    For a PRIVATE API Gateway endpoint, a resource policy is required to grant access to other VPCs, as the endpoint policy alone is insufficient. Peering or changing to REGIONAL adds unnecessary exposure.

  62. Question 62 of 75A security team has mandated that only approved Amazon Machine Images (AMIs) can be used for launching Amazon EC2 instances. The security team requires a method of automatically validating compliance with the new mandate. Which solution can the security team use to find unapproved AMIs for new and existing Amazon EC2 instances?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Deploy the AWS Config rule "approved_ami_by_id" and specify the approved AMI IDs.

    AWS Config's 'approved_ami_by_id' rule is a managed service that continuously checks EC2 instances against a list of approved AMIs, identifying non-compliance for both new and existing instances.

  63. Question 63 of 75A multinational company is operating a global web application on AWS behind a CloudFront distribution. As part of their security enhancement, the company has enabled AWS WAF on the CloudFront distribution with a Web ACL. For compliance purposes, the company requires comprehensive logging of all requests hitting the web ACL. They have already prepared an Amazon S3 bucket for storing these logs.

    Select 2 answers.

    Show answer & explanation

    Correct answer: E. Enable logging in AWS WAF settings, associate the web ACL with an Amazon Kinesis Data Firehose delivery stream. · F. Create an Amazon Kinesis Data Firehose delivery stream in the same AWS Region as the web ACL. Specify the S3 bucket as the destination for the delivery stream.

    Enabling WAF logging and using Kinesis Firehose to deliver logs to S3 is the standard AWS method for centralized, scalable logging of WAF activity.

  64. Question 64 of 75An Amazon EC2 web server has been deployed into Subnet B within a VPC. An EC2 instance in Subnet A within the same VPC must be able to connect to the web service. A network administrator has created a security group and added both instances to it. Subnet A uses a default Network ACL. A custom Network ACL has been created and attached to Subnet B. Which rules must be created to successfully connect to the web server? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: A. Security group TCP port 80 inbound and TCP port 80 outbound. · E. Network ACL: TCP port 80 inbound and TCP ports 1024-65535 outbound.

    The security group must allow inbound traffic on port 80. Network ACLs are stateless, so a rule for the high return port range is necessary.

  65. Question 65 of 75A company is running a batch data processing application in an Amazon EC2 instance, which requires frequent access to an Amazon DynamoDB table. The company's security policies mandate that all connections to DynamoDB should be private and secure. The company has set up a Gateway VPC Endpoint for DynamoDB in the VPC where the EC2 instance resides. Even though the EC2 instance is configured to be within a private subnet with a NAT gateway for internet access, the traffic from the EC2 to DynamoDB goes through the NAT gateway instead of the Gateway VPC endpoint.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Associate the Gateway VPC Endpoint with the route table of the private subnet, where the EC2 instance resides.

    EC2 instances use the route table to determine traffic destinations. Associating the endpoint with the route table forces DynamoDB traffic through the private endpoint.

  66. Question 66 of 75A company created an AWS KMS key in the AWS Key Management Service (KMS) with imported key materials. The company policy requires that all encryption keys must be rotated every 365 days. What must be done to implement policy requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a new KMS key, import new key material, and point the key alias to the new KMS key.

    KMS keys with imported material cannot be automatically rotated. You must create a new key and update the alias to point to the new key.

  67. Question 67 of 75An application uses Amazon EC2 instances to retrieve messages from an Amazon SQS queue. The EC2 instances have an instance profile assigned that uses an IAM role to provide permissions to the queue. A security engineer has been asked to investigate why the instances are not able to retrieve messages. The solution should follow the principle of least privilege. What actions should be taken to identify the cause of the? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: D. Check if an Amazon SQS policy explicitly denies access to the IAM role used by the instances. · E. Check the configuration of the IAM role attached to the instance profile to ensure it has sufficient permissions.

    First, check the IAM role's permissions for sqs:ReceiveMessage. Second, check the SQS policy for an explicit deny that might override the IAM permissions.

  68. Question 68 of 75A large enterprise has an AWS setup which contains multiple accounts managed through AWS Organizations. The accounts are categorized into several OUs based on the company's departmental structure. The security team now wants to enforce a policy to prevent any accidental deletion of S3 buckets across all accounts. Which solution should the security team implement to meet this requirement?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Create an SCP that includes a Deny rule for the s3:DeleteBucket action. Apply this SCP to all the OUs in the organization.

    SCPs are designed for centralized governance across multiple AWS accounts, making this the ideal solution for enforcing an organization-wide S3 deletion block. The other options are either impossible or require impractical per-account management.

  69. Question 69 of 75A company hosts video files for a website in an Amazon S3 bucket that is configured as an origin for an Amazon CloudFront distribution. The company was recently notified that the videos were being accessed from unauthorized countries. Which actions should a security engineer take the limit the distribution of the video files? (Select TWO.)

    Select 2 answers.

    Show answer & explanation

    Correct answer: B. Create an origin access identity (OAI) for the CloudFront distribution and update the S3 bucket policy to restrict access to the OAI. · C. Update the distribution settings in CloudFront and configure restrictions based on the geography of the request.

    CloudFront's geo-restriction feature directly blocks countries, and using an Origin Access Identity ensures requests can't bypass CloudFront to access S3 directly. IP-based restrictions in S3 are hard to manage against proxies.

  70. Question 70 of 75A company stores highly confidential information in an Amazon S3 bucket. The security team requires that any changes to the bucket policy are automatically remediated, and alerts of these changes are sent to their team members. Which actions should a security engineer take to meet these requirements with the LEAST effort?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use AWS Config with Auto Remediation to remediate any changes to S3 bucket policies. Configure alerting with AWS Config and Amazon SNS.

    AWS Config is specifically built for continuous monitoring and automated remediation of resource configurations, which perfectly meets the requirement for the least effort. Custom solutions like Lambda require more development.

  71. Question 71 of 75An IAM user is unable to assume an IAM role using the AWS CLI. The IAM policy assigned to the user includes the following statement:

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. "Action": "sts:AssumeRole"

    The sts:AssumeRole action is the correct API call for an IAM user to assume a role, as it's part of the Security Token Service. The 'ec2' action is a common trap.

  72. Question 72 of 75A media company is streaming their content globally via AWS, but due to legal constraints, it needs to restrict data storage to a specific AWS region using AWS Organizations. A security engineer is tasked with preventing users from storing data in any other region. Which approach will allow the security engineer to implement these requirements with the MINIMUM operational overhead?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Implement an SCP that uses the "aws:RequestedRegion" condition to deny actions outside the approved region. Attach the SCP to the AWS account under AWS Organizations.

    AWS Organizations SCPs enforce region restrictions at the organizational level, providing the minimum overhead compared to manually applying IAM policies to individual users.

  73. Question 73 of 75A company has started to deploy resources to the AWS cloud. Initial resources have been deployed in the US West (Oregon) Region and an AWS CloudTrail trail has been created to record API activity in a bucket in the same Region. The security team requires that API activity is captured from all Regions and stored in a central Region.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Change the existing single-region trail to log all regions and capture API activity in a single central Amazon S3 bucket.

    Modifying an existing trail to log all regions is the simplest method to centralize CloudTrail logs, as it avoids managing multiple trails.

  74. Question 74 of 75A developer is attempting to access an Amazon S3 bucket in a member account in AWS Organizations. The developer is logged in to the account with user credentials and has received an access denied error with no bucket listed. The developer should have read-only access to all buckets in the account. A security engineer has reviewed the permissions and found that the developer's IAM user has been granted read-only access to all S3 buckets in the account.

    Select 2 answers.

    Show answer & explanation

    Correct answer: C. Check the SCPs set at the organizational units (OUs). · E. Check for the permissions boundaries set for the IAM user.

    SCPs restrict all accounts in an OU, while permissions boundaries set the maximum permissions for an identity, both could cause 'access denied'.

  75. Question 75 of 75A company uses an Amazon RDS MySQL database instance to store customer order data. The security team have requested that SSL/TLS encryption in transit must be used for encrypting connections to the database from application servers. The data in the database is currently encrypted at rest using an AWS KMS key. How can a security engineer enable encryption in transit?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Download the AWS-provided root certificates. Use the certificates when connecting to the RDS DB instance.

    AWS provides root certificates for clients to use when connecting to RDS with TLS encryption. Option A is a trap as KMS is for encryption at rest, not in transit. Option B is wrong because self-signed certificates are not supported.

This test also exists as narrated videos — every answer explained out loud:

More free practice tests at certpunch.com and new video rounds on @CertPunch.

Scroll to Top