ExamQuestions.com

Register
Login
AWS Certified Security Specialty Exam Questions

Amazon

AWS Certified Security Specialty

234 / 310

Question 234:

Your AWS account (111111111111) owns an SQS queue in us-east-2 Region which is used to store messages, and downstream applications get messages from the queue for processing. At the moment, EC2 instances in another AWS account (222222222222) need to send messages to the queue. You want to give access to these instances on the condition that the IP range is 203.0.113.0/24. How would you configure the SQS queue?

Answer options:

A.In AWS Management Console, click the Add a Permission button. Select account 222222222222 as the Resource, allow the SQS SendMessage action and add an IpAddress condition.
B.In AWS Management Console, click the Add a Permission button. Select account 222222222222 as the Principal, allow all SQS actions and add an NotIpAddress condition.
C.Configure the SQS access policy as below:
{
 "Version": "2012-10-17",
 "Id": "QueuePolicy",
 "Statement" : [{
"Sid": "1",
"Effect": "Deny",
"Principal": {
 "AWS": [
"222222222222"
 ]
},
"Action": [
 "sqs:*"
],
"Resource": "arn:aws:sqs:us-east-2:111111111111:ExampleQueue",
"Condition": {
 "IpAddress": {
"AWS:NotIpAddress": "203.0.113.0/24"
 }
}
 }]
}
D.Modify the SQS queue policy as below:
{
 "Version": "2012-10-17",
 "Id": "QueuePolicy",
 "Statement" : [{
"Sid": "1",
"Effect": "Allow",
"Principal": {
 "AWS": [
"222222222222"
 ]
},
"Action": [
 "sqs:SendMessage",
 "sqs:ReceiveMessage"
],
"Resource": "arn:aws:sqs:us-east-2:111111111111:ExampleQueue",
"Condition": {
 "IpAddress": {
"AWS:SourceIp": "203.0.113.0/24"
 }
}
 }]
}