148 Commits
Author SHA1 Message Date
Donald NessandGitHub 699ada1724 Add guards for code that relies on _Concurrency (#237)
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet
See swift-server/swift-service-lifecycle#110
0.5.2
2021-10-04 17:20:07 -07:00
Cory BenfieldandFabian Fett dc37adebe7 Clean up dependency graph and imports (#218)
- Correctly express the dependency on NIO in Package.swift
- Correctly import _NIOConcurrency in files where it's used
0.5.1
2021-08-24 17:37:21 +02:00
Joel SaltzmanandFabian Fett f9d10b2fdc Renamed completeWithAsync to completeWithTask (#221)
* Renamed EventLoopPromise's `completeWithAsync` to `completeWithTask` (based on the SwiftNIO renaming)
* Updated swift-nio dependency to 2.32.0
2021-08-24 17:36:39 +02:00
Fabian FettandGitHub a9e15b13b3 Fix platform requirements (#214)
- Replace the placeholder platform requirements with `@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)` 
- Bump required dependency versions: `swift-nio`, `swift-log` and `swift-backtrace`
0.5.0
2021-07-21 20:47:35 +02:00
tomer doronandGitHub fce7884651 add ci setup for 5.5 (#211) 2021-06-29 09:35:23 -07:00
DwayneCoussementandGitHub 9a7d9d0941 SNS MessageAttributes are optional (#208)
motivation: Notice that if you check the contents of the SQS records, some kind of transform happened on the original SNS message. MessageAttributes in the above example, these will not be set, so this is the initial fix.

changes: make MessageAttributes are optional
2021-06-11 10:14:48 -07:00
tomer doronandGitHub 5711b3fe1c adopt SSWG security guidelines (#209)
* add SECURITY.md detailing the security process
* Update readme.md
2021-06-11 10:02:16 -07:00
tomer doronandGitHub 32f879f7f1 update 5.4 to release docker image (#207)
motivation: 5.4 is out!

changes: use release docker images instead of nightly
2021-05-06 17:43:10 -07:00
19fc295aa0 async/await support (#186)
- Add an `AsyncLambdaHandler`. Will be renamed to `LambdaHandler` as soon as we drop the current callback based `LambdaHandler`.
- The default way to use an `AsyncLambdaHandler` is to use `@main` to execute it. Don't use `Lambda.run` for it. We wan't to remove `Lambda.run` for 1.0.

Co-authored-by: tomer doron <tomerd@apple.com>
2021-04-27 22:47:11 +02:00
MLandGitHub edbfa795b6 Updated S3.Event (#195)
motivation: support s3:ObjectRemoved:* event

changes:
* Changed the S3.Event object size field to an optional due to the missing field on a s3:ObjectRemoved:* event
* Added one additional test to check propper json decoding
2021-04-15 10:35:08 -07:00
Fabian FettandGitHub 19a9f92538 Inline default LambdaHandler implementations (#201)
Add `@inlinable` to default LambdaHandler implementations. This ensures that those implementations can be inlined into user code and can be specialized for their input and output types.
2021-04-14 22:59:42 +02:00
Fabian FettandGitHub ab13e51984 Performance Improvements (#199)
Modifications:
- Replace `HTTPHandler` with `NIOHTTPClientResponseAggregator`, to fix a CoW issue. This increases performance.
- Ensure that we only use one `EventLoop` in tests.
- Use `syncOperations` to setup the `HTTPClient`.
2021-04-14 00:21:38 +02:00
Fabian FettandGitHub 1bf9c0a8e7 Update .mailmap (#198) 2021-03-31 12:40:13 -07:00
Fabian FettandGitHub 439deca33e Add --disable redundantExtensionACL to .swiftformat (#197) 2021-03-30 14:08:43 -07:00
Fabian FettandGitHub a49a87341a Update swiftformat (#196)
changes: 
* Update swiftformat from 0.44 to 0.47
* Adjust rules
2021-03-26 10:34:34 -07:00
9166653bd8 update code of conduct (#190)
motivation: align with swift project coc update

changes: update coc to the version used by the swift project (contributor-covenant.org  1.4)

Update 0226-package-manager-target-based-dep-resolution.md

Co-authored-by: Konrad `ktoso` Malawski <ktoso@apple.com>
2021-03-05 12:16:07 +09:00
tomer doronandGitHub 607369b040 add notice file (#191)
motivation: add notice for scripts that came from SwiftNIO

changes: add notice file
2021-03-04 15:58:48 -08:00
DwayneCoussementandGitHub e33e4afbf0 Add support for AppSync events. (#187)
motivation: Support AWS AppSync events
changes: add Codable models for AppSync events
0.4.0
2021-03-02 13:05:50 -08:00
tomer doronandGitHub d3e88bf9cd add docker setup for 5.4 and head/main (#189) 2021-02-27 12:57:06 -08:00
Fabian FettandGitHub bfdeb75e32 Use welcoming language (#184) 2021-01-21 21:05:43 -08:00
JoshandGitHub a5ef4e9e04 Fixed typo. (#183)
"avaialble" becomes "available"
2021-01-15 06:54:07 +09:00
Ralph KüpperandGitHub ee2a6e0cb3 Fix the queryStringParameters in ALB.TargetGroupRequest. (#182) 2021-01-06 09:16:51 +01:00
Matt MassicotteandGitHub 15affafc88 Correct typo in SQS example (#181) 2020-12-29 19:37:19 +09:00
f51eeb6c84 Fixed the visibility of the JWT in an API Gateway V2 Request. (#178)
Co-authored-by: Johannes Bosecker <johannes@Johanness-MacBook-Air.local>
2020-12-07 16:54:03 +09:00
Fabian FettandGitHub edef0363b6 updates to APIGateway V2 payloads
* Properties of HTTPResponses are now var (#176)
* remove redundant multiValueHeaders
2020-10-13 15:02:45 -07:00
tomer doronandGitHub a2b5326671 remove symbolicate-linux-fatal from Docker (#173)
motivation: we are not actually using symbolicate-linux-fatal in any meaningful way in CI and it's pinned to the master branch which has been removed

changes: remove symbolicate-linux-fatal fetching from Docker
2020-10-08 09:13:29 +09:00
Filipp FediakovandGitHub 0afbf42226 Fix typo in LambdaRunner.swift documentation (#171) 2020-09-25 18:12:09 +02:00
tomer doronandGitHub 944e16495a Swift 5.3 is released, use if for CI (#170) 0.3.0 2020-09-18 12:59:02 -07:00
tomer doronandGitHub f175b5452f switch to 5.3 nightly now that it is published (#164)
motivation: stable 5.3 ci

changes: pin 5.3 ci jobs to 5.3 nightlies instead of master
2020-08-19 11:18:56 -07:00
tomer doronandGitHub 8986809d8e simplify date formatting (#159)
motivation: use consistent date formatting across platforms

changes: use manually configured DateFormatter instead of ISO8601DateFormatter
2020-08-14 14:24:29 -07:00
tomer doronandGitHub f731664c4d remove requirment on macOS 10.13 (#156)
motivation: simplify downstream libraries

changes: precondition out debugging uses cases on macOS < 10.13
2020-08-10 10:02:12 -07:00
tomer doronandGitHub f3c68d66c4 better error message when invoking local lambda server with incorrect http method (#157)
motivation: nicer error messages

changes: return 405 when using wrong http method on the lambda invocatoin endpoint (local debug server)
2020-08-06 14:39:32 -07:00
tomer doronandGitHub 9ebc9dda20 give better error when lambda fails to start (#155)
motivation: in error cases where lamnda fails to start the process fails silently and exists with code 0

changes: change the blocking API to check on the result and fatalError if lambda cannot be started / run
2020-08-06 14:08:25 -07:00
2067f4aea1 JSONEncoder/JSONDecoder and String convenience methods (#144)
Co-authored-by: Konrad `ktoso` Malawski <konrad.malawski@project13.pl>
2020-08-03 21:04:13 +02:00
07a11c4c0f Correct project URL in CONTRIBUTING.md (#154)
Co-authored-by: Michal A <michal@pokryfka.net>
2020-08-03 08:38:56 +02:00
pokryfkaandGitHub 1b594cad62 Generate trace ID in correct format (#139)
motivation: more correct Xray TraceID

changes:
* add AmazonHeaders::generateXRayTraceID
* Generate correct trace ID in LocalLambda Server
* Generate correct trace ID in LambdaRuntimeClientTest
2020-07-07 18:53:25 -07:00
tomer doronandGitHub b8834b21c2 improve LocalDebugging readme (#137)
motivation: clearer guidelines for using the example

changes: fix a few typos, fix incorrect scheme name and add a bit more prose
2020-07-02 11:18:23 -07:00
Adam FowlerandGitHub 5130278087 SES time zone (#135)
motivation: Sometimes common header date comes with an alphabetical timezone in brackets after the numeric timezone

changes:
* Support common header date format with brackets
* Update readme with SES Event link
2020-06-27 13:16:52 -07:00
tomer doronandGitHub b9224e2fb6 examples deployment scripts refresh (#133)
motivation: make sure examples are up tp date

changes:
* use swift:5.2 images instead of nighlies
* compute dependencies to make zipfile as small as possible
* make scripts more consistent
2020-06-25 13:38:25 -07:00
tomer doronandGitHub 2bac89639f add syncShutdown to LambdaHandler (#132)
motivation: make shutdown easier to use

changes:
* override shutdown to use the offloadQueue to perform syncShutdown
* add empty syncShutdown that can be implmented by the concrete Lambda function
0.2.0
2020-06-18 12:48:13 -07:00
Andrea ScuderiandGitHub 0535cb72eb Fix SAM Examples after directory change (#124) 2020-06-17 13:37:51 -07:00
tomer doronandGitHub 034afa1a9b update contributors list (#131)
motivation: give credit where credit due

changes: update CONTRIBUTORS.txt with recent contributions
2020-06-17 11:33:31 -07:00
Adam FowlerandGitHub d2f5c1c324 Added SES Event type (#130)
motivation: support event triggers from SES

changes: Added SES Event type
2020-06-17 09:53:53 -07:00
Fabian FettandGitHub 437a60d7a0 Added shutdown() -> EventLoopFuture<Void> to the ByteBufferLambdaHandler (#122)
* Added `syncShutdown() throws` to the `ByteBufferLambdaHandler`

* Updated to use a `ShutdownContext`

* Review comments addressed.
2020-06-17 07:34:01 -07:00
Ro-MandGitHub 77280662e3 Added header when reporting failing invocations or initializations #116 (#128)
* allow the users of client to provide headers
* add initialization error header
* add error header to failed invocations
* fix external setting of ip and port via config
* add tests
2020-06-17 06:55:05 -07:00
tomer doronandGitHub d1a927650a add initialization context (#126)
motivation: in more complex initialization scearios you may want access to a logger or other utilities

changes:
* introduce new InitializationContext type that could be extended in the future without breaking the API in semantic-major way
* instead of passing in EventLoop to the handler factory, pass in a context that includes a Logger, an EventLoop and a ByteBufferAllocator
* fix a bug where we dont hop back to the event loop when coming back from the handler
* adjust tests to the new signature
2020-06-16 11:08:00 -07:00
tomer doronandGitHub 246088e340 Add GitHub issue and PR templates (#127)
motivation: capture issue/PR info consistently

changes: add .github directory with relevant PR and issue templates
2020-06-15 10:16:01 +02:00
Andrea ScuderiandGitHub c683b41545 Add example scripts and docs for Serverless Framework (#113)
* Add example scripts and docs for Serverless Framework
* Refactor Examples folder and scripts
- Add a common config.sh script
- Move SAM templates to scripts/SAM
- Add Serverless templates to scripts/serverless
- Update the scripts to work with new folder structure and config.sh
2020-06-12 12:14:37 -07:00
Fabian FettandGitHub a5e2fd0f10 Readme: Making Request and Response types explicit in Lambda.run callback (#111) 2020-06-07 08:06:15 -07:00
Fabian FettandGitHub 0008e59bab Rename payload to event (#115) 2020-06-07 07:47:05 -07:00