Skip to content

fixes #160 Add validation for roleArn to avoid NPE#161

Merged
stevehu merged 2 commits intomasterfrom
issue160
Mar 20, 2026
Merged

fixes #160 Add validation for roleArn to avoid NPE#161
stevehu merged 2 commits intomasterfrom
issue160

Conversation

@stevehu
Copy link
Contributor

@stevehu stevehu commented Mar 20, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds fail-fast configuration validation to prevent NullPointerException when STS AssumeRole is enabled but roleArn is not configured, improving reliability of the Lambda invoker configuration loading path.

Changes:

  • Invoke a new validate() step during LambdaInvokerConfig construction.
  • Add validation that throws ConfigException when stsEnabled=true and roleArn is blank.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@DiogoFKT DiogoFKT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link
Contributor

Copilot AI commented Mar 20, 2026

@stevehu I've opened a new pull request, #162, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* Add unit tests for roleArn validation when stsEnabled is true

Co-authored-by: stevehu <2042337+stevehu@users.noreply.github.com>
Agent-Logs-Url: https://github.com/networknt/light-aws-lambda/sessions/9112dc37-502e-4d9a-9701-cb1fa8121d5b

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stevehu <2042337+stevehu@users.noreply.github.com>
@stevehu stevehu merged commit 62a3cd1 into master Mar 20, 2026
1 check passed
@stevehu stevehu deleted the issue160 branch March 20, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants