← Quiz: AWS Core Services: all 10 questions
Quiz: AWS Core Services · Question 8 of 10
What does this print? (code)
What does this print?
from fnmatch import fnmatch
allowed = ["s3:GetObject"]
pattern = "arn:aws:s3:::notes/public/*"
req = ("s3:GetObject", "arn:aws:s3:::notes/private/a.pdf")
print(req[0] in allowed and fnmatch(req[1], pattern))
- A.True
- B.False
- C.None
- D.An error
Answer & explanation
Correct answer: False
The action is allowed, but the resource is under private/, not public/, so the request is denied.
Can you get the rest right without peeking?
Take the timed Quiz: AWS Core Services quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →