Fix forward the permission error of scheduler lambda#22
Merged
waisingyiu merged 2 commits intomainfrom Jul 29, 2025
Merged
Conversation
SHession
approved these changes
Jul 29, 2025
Contributor
SHession
left a comment
There was a problem hiding this comment.
Solution makes sense! Slightly unfortunate we need to make this change but the most pragmatic solution for now.
| }); | ||
| scheduledLambda.addToRolePolicy(s3BucketPolicy) | ||
| scheduledLambda.addToRolePolicy(sharedParametersPolicy) | ||
| scheduledLambda.addToRolePolicy(pandaS3BucketPolcy) |
Contributor
There was a problem hiding this comment.
Can we add a comment to explain why this is necessary?
Contributor
Author
There was a problem hiding this comment.
Sure, I've added in the last commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
After we bumped the pan-domain-node library to v1.2.0 in #20, we found that the scheduler lambda threw an access denied exception.
In #20, we granted the "Express" lambda with the permission to read objects from the bucket
pan-domain-auth-settingsso that it could load the public settings file with the new version of pan-domain-node.While the scheduler lambda does not do any authentication, it still set up the
PanDomainAuthenticationclass due to the fact that their code are bundled together.This pull request grant the scheduler lambda with this permission to fix the error.
How to test
Previously we could see the error log from scheduler:

After deploying the fix, we can see the scheduler can run properly:

I also shared a Google sheet with gudoc. I could see new data coming through after I added new data to the spreadsheet.
