A scheduled Lambda suddenly gets AccessDenied. What do you investigate first?
After this you can answer: A scheduled Lambda suddenly gets AccessDenied. What do you investigate first?
Say it in 30 seconds
Section titled “Say it in 30 seconds”The deeper answer
Section titled “The deeper answer”This is an explain-only scheduled-job scenario. MiniTickets has an SQS-driven ticket Lambda, not a scheduled S3-to-database importer. Its role is a concrete least-privilege example: object writes are limited to tickets/*, and secret reads name one signing secret.
For the hypothetical importer, compare yesterday’s successful object with today’s object key, owner and encryption key. An S3 authorization failure and a KMS decrypt denial need different evidence. A database password rejection is another stage entirely; a rotated secret cached by a warm process can explain it without any S3 policy change.
Check identity policies and resource policies, plus any applicable boundary, session policy or organization policy. An explicit deny cannot be repaired by adding another allow. CloudTrail data events require the relevant logging configuration; absence from Event history is not proof that an object request never happened. AWS’s denial guide explains the different policy contexts.
Counter-questions
Section titled “Counter-questions”Would you blame IAM propagation first?
Should you rotate access keys?
What if permissions did not change?
Where in MiniTickets
Section titled “Where in MiniTickets”Read the path chapter, select the relevant map piece →, then inspect infra/src/tickets/iam.ts → createTicketRole. Work through the related case for a diagnostic example.
Read this book online: https://book.theversehub.in/