Skip to content

Navigation Menu

Sign in
Sign up

fix(lambda-events): omit null IoT policy documents - #1168

Open
IamPritamAcharya wants to merge 1 commit into
aws:main from
IamPritamAcharya:fix/iot-authorizer-null-policy-documents
Open

fix(lambda-events): omit null IoT policy documents #1168
IamPritamAcharya wants to merge 1 commit into
aws:main from
IamPritamAcharya:fix/iot-authorizer-null-policy-documents

Conversation

@IamPritamAcharya

@IamPritamAcharya IamPritamAcharya commented Sep 6, 2026

Copy link
Copy Markdown

📬 Issue #, if available:

Fixes #1131.

✍️ Description of changes:

AWS IoT rejects custom authorizer responses containing null entries in
policyDocuments.

This change keeps the existing Vec<Option<IamPolicyDocument>> public type to
preserve backwards compatibility and adds a custom serializer that omits
None entries while preserving the order of the remaining policy documents.

Regression tests cover:

  • a single policy document
  • mixed Some and None entries
  • a vector containing only None
  • an empty vector
  • unchanged deserialization of null policy documents

Validation completed:

  • cargo +nightly fmt --all -- --check
  • cargo test --package aws_lambda_events --no-default-features --features iot
  • cargo +stable clippy --workspace --all-features -- -D warnings

🔏 By submitting this pull request

  • I confirm that I've ran cargo +nightly fmt.
  • I confirm that I've ran cargo clippy --fix.
  • I confirm that I've made a best effort attempt to update all relevant documentation.
  • I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

IoTCoreCustomAuthorizerResponse create invalid payalod

1 participant

AltStyle によって変換されたページ (->オリジナル) /