Security and Compliance
162 questions
A SysOps administrator is launching a new Amazon EC2 instance that must run an application that accesses an Amazon S3 bucket. An IAM role with the necessary S3 permissions has already been created. The administrator needs to configure the EC2 instance to run the application using this role.
Which two actions are required to successfully complete this configuration? (Select TWO.)
Select all that apply
A SysOps Administrator is configuring an AWS Lambda function in AWS Account to decrypt sensitive application configuration files. The configuration files are encrypted using a customer managed KMS key. The Administrator has attached an IAM policy to the Lambda function's execution role that grants permission for the `kms:Decrypt` action on the KMS key. However, when executing, the Lambda function fails with an AccessDeniedException during the decryption step.
Upon inspecting the KMS key policy, the Administrator finds only the following statement:
{
"Sid": "Allow Key Administration",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::555555555555:role/SysOpsAdminRole"
},
"Action": "kms:*",
"Resource": "*"
}
Which modification to the KMS key policy will resolve this issue by allowing the Lambda function's IAM policy to take effect?
An administrator wants to implement automatic remediation for non-compliant resources detected by an AWS Config rule. The rule identifies Amazon S3 buckets that allow public read access. The administrator plans to use the `AWS-DisableS3BucketPublicReadWrite` Systems Manager (SSM) Automation document as the remediation action. During configuration, the administrator encounters permission errors and the remediation fails to run.
Which actions must the administrator take to successfully resolve the permission issues and enable the automated remediation? (Select TWO.)
Select all that apply
A SysOps Administrator is securing a customer managed KMS key in the us-west-2 Region that is used to encrypt Amazon Elastic Block Store (EBS) volumes. The administrator wants to enforce the following security requirements:
- Users in the AWS account must be able to administer the key (such as enabling rotation or updating policies) using IAM policies.
- The key must only be allowed to encrypt and decrypt EBS volumes when the request is made by Amazon EC2 on behalf of a user, preventing direct API calls using the AWS CLI or SDKs.
Which two actions must the administrator take to meet these requirements? (Select two.)
Select all that apply
An application running on an Amazon EC2 instance in Account B (444455556666) needs to decrypt sensitive files stored in an Amazon S3 bucket in Account A (111122223333). The files in the S3 bucket are encrypted using Server-Side Encryption with AWS KMS (SSE-KMS) and a customer managed KMS key in Account A. The KMS key currently has the following key policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Enable IAM User Permissions",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:root"
},
"Action": "kms:*",
"Resource": "*"
}
]
}
An IAM role named AppRole is attached as the instance profile for the EC2 instance in Account B. Which TWO configurations are required to allow AppRole in Account B to decrypt the objects in the S3 bucket? (Select TWO.)
Select all that apply
A SysOps Administrator is configuring an AWS Config rule to monitor whether Amazon EC2 instances have public IP addresses. The administrator sets up automatic remediation using the AWS-StopEC2Instance Systems Manager (SSM) Automation document. The administrator creates an IAM role named ConfigRemediationRole that has a trust relationship with ssm.amazonaws.com and has the necessary permissions to stop EC2 instances. When the administrator attempts to associate this role with the AWS Config remediation configuration, the AWS Config console displays an error: 'Insufficient permissions to pass the remediation role.' Which action will resolve this issue?
A SysOps administrator is configuring a Python script hosted on an Amazon EC2 instance in Account A () to automate the provisioning of temporary worker instances. The script uses the AWS SDK to call the `RunInstances` API and associates the new instances with an IAM instance profile that contains an IAM role named `WorkerExecutionRole`.
The EC2 instance running the script is associated with an IAM role named `AutomationAdminRole` which has the following IAM policy attached:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:RunInstances",
"ec2:DescribeInstances"
],
"Resource": "*"
}
]
}
When the script execution is triggered, it fails with an `UnauthorizedOperation` error during instance launch.
Which modification to the IAM configuration of `AutomationAdminRole` is required to resolve this error?
A SysOps administrator is configuring a third-party monitoring application running on Amazon EC2 instances in a Shared Services account (). The application needs to analyze logs stored in an Amazon S3 bucket within a Production account (). The S3 bucket is encrypted with an AWS KMS Customer Managed Key (CMK) in the Production account. The application runs under an IAM instance profile associated with a role named `EC2MonitorRole` in the Shared Services account, and it must assume an IAM role named `CrossAccountReaderRole` in the Production account to read the S3 objects. Which of the following configuration steps are required to establish this cross-account access? (Select TWO.)
Select all that apply
A SysOps administrator is using Amazon S3 Batch Operations to copy a large volume of objects from a source S3 bucket to a destination S3 bucket. The administrator creates an IAM role named S3BatchCopyRole to allow S3 Batch Operations to perform the copy on their behalf. The trust policy of S3BatchCopyRole is configured to allow the batchoperations.s3.amazonaws.com service principal to assume the role. However, when the administrator attempts to create the S3 Batch Operations job and specifies S3BatchCopyRole, the operation fails with an Access Denied error. The administrator's IAM user already has an attached policy granting full permissions to S3 (s3:*). Which action must be taken to successfully create the S3 Batch Operations job?
A SysOps Administrator is implementing a security monitoring solution to detect whenever an AWS Identity and Access Management (IAM) access key is created or updated. The administrator configures an Amazon EventBridge rule in the eu-west-1 region with an Amazon Simple Notification Service (Amazon SNS) topic as the target. Although IAM access keys are being created and updated, the security team is not receiving any SNS notifications. Which of the following configurations should the SysOps Administrator implement to resolve this issue? (Select TWO.)
Select all that apply
A SysOps administrator has the following IAM policy attached to their IAM user:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EC2LaunchPermissions",
"Effect": "Allow",
"Action": [
"ec2:RunInstances",
"ec2:AssociateIamInstanceProfile"
],
"Resource": "*"
}
]
}
The administrator attempts to launch an Amazon EC2 instance and associate it with an existing IAM role named `WebServerRole` by running the following AWS CLI command:
`aws ec2 run-instances --image-id ami-0c55b159cbfafe1f0 --instance-type t3.micro --iam-instance-profile Name=WebServerProfile`
The command fails with the following error message:
`An error occurred (UnauthorizedOperation) when calling the RunInstances operation: User: arn:aws:iam::123456789012:user/AdminUser is not authorized to perform: iam:PassRole on resource: arn:aws:iam::123456789012:role/WebServerRole`
What modification should the administrator make to their user's IAM policy to successfully run the command?
An enterprise monitoring system runs on an Amazon EC2 instance in Subnet Management (). It needs to scrape metrics from a Node Exporter service running on EC2 instances in Subnet Production () on custom TCP port . Subnet Production is associated with a custom Network Access Control List (NACL) that currently blocks all inbound and outbound traffic by default.
Which combination of rules must be added to the Subnet Production NACL to allow the monitoring server to scrape metrics? (Select TWO.)
Select all that apply
A SysOps administrator is configuring an Amazon ECS task to run on an Amazon EC2 instance. The task must read data from an Amazon S3 bucket. The administrator creates an IAM role named ECSTaskS3AccessRole with an attached policy that allows S3 read access.
The trust policy for ECSTaskS3AccessRole is configured as follows:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ecs.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
When the administrator attempts to run the task using the AWS CLI under the SysOpsAdmin IAM user identity, the command fails with the following error:
`ClientError: An error occurred (AccessDenied) when calling the RunTask operation: User: arn:aws:iam::123456789012:user/SysOpsAdmin is not authorized to perform: iam:PassRole on resource: arn:aws:iam::123456789012:role/ECSTaskS3AccessRole`
Which of the following actions are required to resolve this error and ensure the ECS task can successfully run with the required permissions? (Select TWO.)
Select all that apply
A company hosts an API on Amazon EC2 instances behind an Application Load Balancer (ALB), which is protected by an AWS WAF Web ACL. A SysOps administrator notices that legitimate API clients receive HTTP 403 Forbidden responses when uploading payload files larger than . The AWS WAF logs indicate that these requests are blocked by a custom rule designed to inspect the request body for SQL injection (SQLi) attacks. The administrator needs to ensure that clients can upload large payloads while maintaining SQLi threat protection on the inspectable portion of the request body. Which configuration change should the administrator implement to meet these requirements?
A company has an AWS Lambda function that needs to decrypt data using a customer managed KMS key in the same AWS account. A SysOps Administrator has attached an IAM policy to the Lambda execution role that allows the `kms:Decrypt` action on the KMS key. However, when the Lambda function runs, it fails with an `AccessDeniedException` error during the decryption operation. The customer managed KMS key policy contains only the following statement:
{
"Version": "2012-10-17",
"Id": "key-policy-1",
"Statement": [
{
"Sid": "Allow Key Administration",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::123456789012:role/AdminRole"
},
"Action": [
"kms:Create*",
"kms:Describe*",
"kms:Enable*",
"kms:List*",
"kms:Put*",
"kms:Update*",
"kms:Revoke*",
"kms:Disable*",
"kms:Get*",
"kms:Delete*",
"kms:TagResource",
"kms:UntagResource",
"kms:ScheduleKeyDeletion",
"kms:CancelKeyDeletion"
],
"Resource": "*"
"
}
]
}
Which modification to the configuration will resolve this error?
A SysOps Administrator is configuring an AWS CodeBuild project to decrypt sensitive environment variables retrieved from AWS Systems Manager Parameter Store. The parameters are encrypted with a customer managed KMS key in AWS Account `111122223333`. The administrator has already added `kms:Decrypt` and `kms:DescribeKey` permissions to the CodeBuild service role's IAM policy.
The customer managed KMS key has the following key policy:
{
"Version": "2012-10-17",
"Id": "key-policy-1",
"Statement": [
{
"Sid": "Allow direct access to key administrators",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:role/KMSAdminRole"
},
"Action": [
"kms:Create*",
"kms:Describe*",
"kms:Enable*",
"kms:List*",
"kms:Put*",
"kms:Update*",
"kms:Revoke*",
"kms:Disable*",
"kms:Get*",
"kms:Delete*",
"kms:TagResource",
"kms:UntagResource",
"kms:ScheduleKeyDeletion",
"kms:CancelKeyDeletion"
],
"Resource": "*"
}
]
}
When CodeBuild attempts to decrypt the parameters, the build fails with an Access Denied error.
Which of the following modifications will resolve this issue?
A SysOps Administrator is configuring AWS CloudTrail to deliver log events to Amazon CloudWatch Logs for real-time compliance monitoring. The administrator needs to ensure that the integration is secure and log delivery is successful.
Which two configuration steps must the administrator perform to achieve this? (Select TWO.)
Select all that apply
A company's regional API Gateway REST API is protected by an AWS WAF Web ACL. During a security audit, the SysOps administrator identifies a brute-force attempt targeting the `/checkout` endpoint. To mitigate this threat, the administrator must restrict each client IP address to a maximum of requests per minutes on the `/checkout` path only. Traffic to other endpoints must not be affected.
Which configuration should the SysOps administrator implement to meet these requirements?
A SysOps Administrator is configuring an AWS Lambda function to stop underutilized EC2 instances. The administrator has already created the required IAM execution role for Lambda with the correct permissions. However, when the administrator attempts to update the Lambda function configuration to use this execution role, the AWS Management Console displays an Access Denied error.
Which permission must be granted to the SysOps Administrator's IAM user policy to resolve this error?
A SysOps administrator is configuring a daily backup plan in AWS Backup to protect Amazon RDS databases. The administrator wants to use a custom IAM role to execute the backup jobs. Which of the following configuration steps are required to allow AWS Backup to run the backup jobs using this custom role? (Select TWO.)
Select all that apply