Amazon AWS Certified Security - Specialty Exam Practice Questions (P. 2)
- Full Access (509 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #11
An organization wants to deploy a three-tier web application whereby the application servers run on Amazon EC2 instances. These EC2 instances need access to credentials that they will use to authenticate their SQL connections to an Amazon RDS DB instance. Also, AWS Lambda functions must issue queries to the RDS database by using the same database credentials.
The credentials must be stored so that the EC2 instances and the Lambda functions can access them. No other access is allowed. The access logs must record when the credentials were accessed and by whom.
What should the Security Engineer do to meet these requirements?
The credentials must be stored so that the EC2 instances and the Lambda functions can access them. No other access is allowed. The access logs must record when the credentials were accessed and by whom.
What should the Security Engineer do to meet these requirements?
- AStore the database credentials in AWS Key Management Service (AWS KMS). Create an IAM role with access to AWS KMS by using the EC2 and Lambda service principals in the role's trust policy. Add the role to an EC2 instance profile. Attach the instance profile to the EC2 instances. Set up Lambda to use the new role for execution.
- BStore the database credentials in AWS KMS. Create an IAM role with access to KMS by using the EC2 and Lambda service principals in the role's trust policy. Add the role to an EC2 instance profile. Attach the instance profile to the EC2 instances and the Lambda function.
- CStore the database credentials in AWS Secrets Manager. Create an IAM role with access to Secrets Manager by using the EC2 and Lambda service principals in the role's trust policy. Add the role to an EC2 instance profile. Attach the instance profile to the EC2 instances and the Lambda function.
- DStore the database credentials in AWS Secrets Manager. Create an IAM role with access to Secrets Manager by using the EC2 and Lambda service principals in the role's trust policy. Add the role to an EC2 instance profile. Attach the instance profile to the EC2 instances. Set up Lambda to use the new role for execution.Most Voted
Correct Answer:
D
D

The answer, option D, effectively incorporates AWS best practices for secure credentials management in a multi-service environment. AWS Secrets Manager is the appropriate service choice for storing and retrieving database credentials securely. This allows for centralized management of secrets that can be accessed by multiple AWS services like EC2 instances and Lambda functions. For secure access, creating an IAM role tailored for both EC2 and Lambda ensures that only these resources can retrieve the credentials based on the trust relationship defined. Moreover, using Secrets Manager, access to the credentials is logged, which helps in meeting compliance and security auditing requirements. No other options correctly combine all these requirements as efficiently as option D does.
send
light_mode
delete
Question #12
A company has a customer master key (CMK) with imported key materials. Company policy requires that all encryption keys must be rotated every year.
What can be done to implement the above policy?
What can be done to implement the above policy?
- AEnable automatic key rotation annually for the CMK.
- BUse AWS Command Line Interface to create an AWS Lambda function to rotate the existing CMK annually.
- CImport new key material to the existing CMK and manually rotate the CMK.
- DCreate a new CMK, import new key material to it, and point the key alias to the new CMK.Most Voted
Correct Answer:
D
D

Creating a new CMK and importing fresh key material into it annually is spot-on when your existing keys have manual key material imports and can't use AWS's automatic rotation. Every time you spin up a new CMK, just attach the alias that your apps already refer to—it’s like updating a phone number in your contacts, where the name stays the same but the number changes. This keeps everything smooth on the application side since you’re just updating the CMK's reference, not the integration. Super handy for staying agile and secure without a fuss!
send
light_mode
delete
Question #13
A water utility company uses a number of Amazon EC2 instances to manage updates to a fleet of 2,000 Internet of Things (IoT) field devices that monitor water quality. These devices each have unique access credentials.
An operational safety policy requires that access to specific credentials is independently auditable.
What is the MOST cost-effective way to manage the storage of credentials?
An operational safety policy requires that access to specific credentials is independently auditable.
What is the MOST cost-effective way to manage the storage of credentials?
- AUse AWS Systems Manager to store the credentials as Secure Strings Parameters. Secure by using an AWS KMS key.Most Voted
- BUse AWS Key Management System to store a master key, which is used to encrypt the credentials. The encrypted credentials are stored in an Amazon RDS instance.
- CUse AWS Secrets Manager to store the credentials.
- DStore the credentials in a JSON file on Amazon S3 with server-side encryption.
Correct Answer:
A
A

AWS Systems Manager Parameter Store is indeed the most cost-effective choice for storing sensitive credentials like those for IoT devices, as you do not incur direct costs for storing credentials, only for the KMS key used to encrypt them. This feature supports both direct access control and comprehensive auditing via AWS CloudTrail, which aligns seamlessly with the operational safety policy's requirement for auditable access to credentials. Thus, it fulfills the necessary security measures while also being budget-friendly when scaling to manage credentials for numerous devices.
send
light_mode
delete
Question #14
An organization is using Amazon CloudWatch Logs with agents deployed on its Linux Amazon EC2 instances. The agent configuration files have been checked and the application log files to be pushed are configured correctly. A review has identified that logging from specific instances is missing.
Which steps should be taken to troubleshoot the issue? (Choose two.)
Which steps should be taken to troubleshoot the issue? (Choose two.)
- AUse an EC2 run command to confirm that the ג€awslogsג€ service is running on all instances.Most Voted
- BVerify that the permissions used by the agent allow creation of log groups/streams and to put log events.Most Voted
- CCheck whether any application log entries were rejected because of invalid time stamps by reviewing /var/cwlogs/rejects.log.
- DCheck that the trust relationship grants the service ג€cwlogs.amazonaws.comג€ permission to write objects to the Amazon S3 staging bucket.
- EVerify that the time zone on the application servers is in UTC.
Correct Answer:
BC
BC

It's important to clarify a common misconception regarding the CloudWatch Logs agent. The appropriate file to check for rejects due to incorrect timestamps is /var/log/awslogs.log, not /var/cwlogs/rejects.log. When troubleshooting missing logs, ensuring that the `awslogs` service is actively running on the instances is crucial. Equally important is verifying that the assigned permissions enable the agent or associated IAM role to create log groups and streams and push log events. Make sure these steps are prioritized during your diagnostic checks.
send
light_mode
delete
Question #15
A Security Engineer must design a solution that enables the incident Response team to audit for changes to a user's IAM permissions in the case of a security incident.
How can this be accomplished?
How can this be accomplished?
- AUse AWS Config to review the IAM policy assigned to users before and after the incident.Most Voted
- BRun the GenerateCredentialReport via the AWS CLI, and copy the output to Amazon S3 daily for auditing purposes.
- CCopy AWS CloudFormation templates to S3, and audit for changes from the template.
- DUse Amazon EC2 Systems Manager to deploy images, and review AWS CloudTrail logs for changes.
Correct Answer:
A
A

AWS Config is indeed the right tool for the job when it comes to auditing changes to IAM permissions. It automatically records configurations and changes, making it easy to review past and present IAM policies assigned to users in case of any security incidents. This allows your incident response team to effectively track and analyze any alterations without the need to manually add specific rules for IAM changes. It's streamlined, efficient, and does not require additional setups for basic monitoring of IAM resources.
send
light_mode
delete
Question #16
A company has complex connectivity rules governing ingress, egress, and communications between Amazon EC2 instances. The rules are so complex that they cannot be implemented within the limits of the maximum number of security groups and network access control lists (network ACLs).
What mechanism will allow the company to implement all required network rules without incurring additional cost?
What mechanism will allow the company to implement all required network rules without incurring additional cost?
- AConfigure AWS WAF rules to implement the required rules.
- BUse the operating system built-in, host-based firewall to implement the required rules.Most Voted
- CUse a NAT gateway to control ingress and egress according to the requirements.
- DLaunch an EC2-based firewall product from the AWS Marketplace, and implement the required rules in that product.
Correct Answer:
B
B

The most effective and cost-efficient method to manage complex connectivity rules for EC2 instances, when security groups and network ACLs are insufficient, is to use the operating system's built-in host-based firewall. This approach allows you to implement detailed rules directly within the EC2 instances without any extra financial outlays associated with other solutions like AWS WAF or third-party firewall products. Utilizing the host-based firewall is also a straightforward solution that leverages existing capabilities of the operating system.
send
light_mode
delete
Question #17
An IAM user with fill EC2 permissions could bot start an Amazon EC2 instance after it was stopped for a maintenance task. Upon starting the instance, the instance state would change to `Pending`, but after a few seconds, it would switch back to `Stopped`.
An inspection revealed that the instance has attached Amazon EBS volumes that were encrypted by using a Customer Master Key (CMK). When these encrypted volumes were detached, the IAM user was able to start the EC2 instances.
The IAM user policy is as follows:

What additional items need to be added to the IAM user policy? (Choose two.)
An inspection revealed that the instance has attached Amazon EBS volumes that were encrypted by using a Customer Master Key (CMK). When these encrypted volumes were detached, the IAM user was able to start the EC2 instances.
The IAM user policy is as follows:

What additional items need to be added to the IAM user policy? (Choose two.)
- Akms:GenerateDataKey
- Bkms:Decrypt
- Ckms:CreateGrantMost Voted
- Dג€Conditionג€: { ג€Boolג€: { ג€kms:ViaServiceג€: ג€ec2.us-west-2.amazonaws.comג€ } }
- Eג€Conditionג€: { ג€Boolג€: { ג€kms:GrantIsForAWSResourceג€: true } }Most Voted
Correct Answer:
CE
CE
send
light_mode
delete
Question #18
A Security Administrator has a website hosted in Amazon S3. The Administrator has been given the following requirements:
✑ Users may access the website by using an Amazon CloudFront distribution.
✑ Users may not access the website directly by using an Amazon S3 URL.
Which configurations will support these requirements? (Choose two.)
✑ Users may access the website by using an Amazon CloudFront distribution.
✑ Users may not access the website directly by using an Amazon S3 URL.
Which configurations will support these requirements? (Choose two.)
- AAssociate an origin access identity with the CloudFront distribution.Most Voted
- BImplement a ג€Principalג€: ג€cloudfront.amazonaws.comג€ condition in the S3 bucket policy.
- CModify the S3 bucket permissions so that only the origin access identity can access the bucket contents.Most Voted
- DImplement security groups so that the S3 bucket can be accessed only by using the intended CloudFront distribution.
- EConfigure the S3 bucket policy so that it is accessible only through VPC endpoints, and place the CloudFront distribution into the specified VPC.
Correct Answer:
AC
AC

The correct configuration to restrict direct access to an S3-hosted website, ensuring access is only via CloudFront, involves associating an origin access identity (OAI) with the CloudFront distribution and modifying the S3 bucket permissions. The OAI is crucial as it acts as a virtual user identity that grants CloudFront permission to fetch a protected content on behalf of end-users when they request access via CloudFront, not via the direct S3 URL. This setup ensures adherence to both of the security criteria mentioned.
send
light_mode
delete
Question #19
A Security Engineer has created an Amazon CloudWatch event that invokes an AWS Lambda function daily. The Lambda function runs an Amazon Athena query that checks AWS CloudTrail logs in Amazon S3 to detect whether any IAM user accounts or credentials have been created in the past 30 days. The results of the
Athena query are created in the same S3 bucket. The Engineer runs a test execution of the Lambda function via the AWS Console, and the function runs successfully.
After several minutes, the Engineer finds that his Athena query has failed with the error message: `Insufficient Permissions`. The IAM permissions of the Security
Engineer and the Lambda function are shown below:
Security Engineer -

Lambda function execution role -

What is causing the error?
Athena query are created in the same S3 bucket. The Engineer runs a test execution of the Lambda function via the AWS Console, and the function runs successfully.
After several minutes, the Engineer finds that his Athena query has failed with the error message: `Insufficient Permissions`. The IAM permissions of the Security
Engineer and the Lambda function are shown below:
Security Engineer -

Lambda function execution role -

What is causing the error?
- AThe Lambda function does not have permissions to start the Athena query execution.
- BThe Security Engineer does not have permissions to start the Athena query execution.
- CThe Athena service does not support invocation through Lambda.
- DThe Lambda function does not have permissions to access the CloudTrail S3 bucket.Most Voted
Correct Answer:
B
B
send
light_mode
delete
Question #20
A company requires that IP packet data be inspected for invalid or malicious content.
Which of the following approaches achieve this requirement? (Choose two.)
Which of the following approaches achieve this requirement? (Choose two.)
- AConfigure a proxy solution on Amazon EC2 and route all outbound VPC traffic through it. Perform inspection within proxy software on the EC2 instance.Most Voted
- BConfigure the host-based agent on each EC2 instance within the VPC. Perform inspection within the host-based agent.Most Voted
- CEnable VPC Flow Logs for all subnets in the VPC. Perform inspection from the Flow Log data within Amazon CloudWatch Logs.
- DConfigure Elastic Load Balancing (ELB) access logs. Perform inspection from the log data within the ELB access log files.
- EConfigure the CloudWatch Logs agent on each EC2 instance within the VPC. Perform inspection from the log data within CloudWatch Logs.
Correct Answer:
AB
AB

For a comprehensive inspection of IP packet data for security threats or anomalies, a proxy setup on Amazon EC2 instances (option A) or host-based agents on each EC2 instance (option B) is effective. Both methods ensure data is actively inspected rather than just logging actions or flow data which doesn't include packet content. This configuration allows for immediate detection and response to potential security issues within the network traffic, essential for robust security management.
send
light_mode
delete
All Pages