🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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))
  1. A.True
  2. B.False
  3. C.None
  4. 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 →