Sébastien Stormacq d18360e636 fix: Add support for DISABLED status in SES verdict enums (#110) (#111)
## Motivation:
AWS SES can return "`DISABLED`" as a valid status value for spam, virus,
DKIM, and SPF verdicts when certain checks are disabled in the SES
configuration. However, the `SESEvent.Receipt.Verdict.Status` enum was
missing this case, causing JSON decoding to fail with a `DecodingError`
when parsing SES events containing `{"status":"DISABLED"}`.

This issue was reported in #110, where users encountered parsing
failures when processing legitimate SES events from AWS that included
disabled verdict checks.

## Modifications:
Added `.disabled = "DISABLED"` case to the
`SESEvent.Receipt.Verdict.Status` enum in
SES.swift
Converted the existing test to a parameterized test using Swift
Testing's `@Test(arguments:)` syntax
Added a new test case (`eventBodyDisabled`) that includes a SES event
with `spamVerdict.status` set to "`DISABLED`"
Updated the test assertion to verify both `.pass` and `.disabled` status
values are handled correctly

## Result:
SES events with verdict statuses set to "`DISABLED`" will now decode
successfully without throwing errors. The library correctly handles all
valid AWS SES verdict status values: `PASS`, `FAIL`, `GRAY`,
`PROCESSING_FAILED`, and `DISABLED`. The parameterized test ensures both
standard and disabled verdict scenarios are validated automatically.
2026-01-29 07:36:21 +00:00
2024-10-08 13:31:40 +02:00
2018-11-13 17:48:44 -08:00
2025-10-26 19:37:14 +01:00
2025-10-26 19:37:14 +01:00

Swift AWS Lambda Events

Overview

Swift AWS Lambda Runtime was designed to make building Lambda functions in Swift simple and safe. The library is an implementation of the AWS Lambda Runtime API and uses an embedded asynchronous HTTP Client based on SwiftNIO that is fine-tuned for performance in the AWS Runtime context. The library provides a multi-tier API that allows building a range of Lambda functions: From quick and simple closures to complex, performance-sensitive event handlers.

Swift AWS Lambda Events is a supporting library for the Swift AWS Lambda Runtime library, providing abstractions for popular AWS events.

Integration with AWS Platform Events

AWS Lambda functions can be invoked directly from the AWS Lambda console UI, AWS Lambda API, AWS SDKs, AWS CLI, and AWS toolkits. More commonly, they are invoked as a reaction to an events coming from the AWS platform. To make it easier to integrate with AWS platform events, this library includes an AWSLambdaEvents target which provides abstractions for many commonly used events. Additional events can be easily modeled when needed following the same patterns set by AWSLambdaEvents. Integration points with the AWS Platform include:

Note: Each one of the integration points mentioned above includes a set of Codable structs that mirror AWS' data model for these APIs.

Getting started

If you have never used AWS Lambda or Docker before, check out this tutorial or the getting started guide which helps you with every step from zero to a running Lambda.

Swift AWS Lambda Events is a supporting library for the Swift AWS Lambda Runtime library, where you can find further documentation and examples.

Project status

This is the beginning of a community-driven open-source project actively seeking contributions. While the core API is considered stable, the API may still evolve as we get closer to a 1.0 version. There are several areas which need additional attention, including but not limited to:

  • Additional events
  • Additional documentation and best practices
  • Additional examples

Security

Please see SECURITY.md for details on the security process.

S
Description
Swift implementation of AWS Lambda Events
Readme 941 KiB
Languages
Swift 97.4%
Shell 2.6%