Skip to content

Commit 0d1449d

Browse files
committed
Merge branch 'main' into sebsto/streaming+event
2 parents 45aa0ea + f1514b1 commit 0d1449d

File tree

12 files changed

+383
-156
lines changed

12 files changed

+383
-156
lines changed

Examples/CDK/infra/package-lock.json

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/Streaming/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ swift package archive --allow-network-connections docker
3434
If there is no error, there is a ZIP file ready to deploy.
3535
The ZIP file is located at `.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingNumbers/StreamingNumbers.zip`
3636

37+
## Test locally
38+
39+
You can test the function locally before deploying:
40+
41+
```bash
42+
swift run
43+
44+
# In another terminal, test with curl:
45+
curl -v \
46+
--header "Content-Type: application/json" \
47+
--data '"this is not used"' \
48+
http://127.0.0.1:7000/invoke
49+
```
50+
3751
## Deploy with the AWS CLI
3852

3953
Here is how to deploy using the `aws` command line.

Sources/AWSLambdaRuntime/ControlPlaneRequestEncoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct ControlPlaneRequestEncoder: _EmittingChannelHandler {
9393
extension String {
9494
static let CRLF: String = "\r\n"
9595

96-
static let userAgent = "Swift-Lambda/Unknown"
96+
static let userAgent = "Swift-Lambda/\(Version.current)"
9797
static let userAgentHeader: String = "user-agent: \(userAgent)\r\n"
9898
static let unhandledErrorHeader: String = "lambda-runtime-function-error-type: Unhandled\r\n"
9999

0 commit comments

Comments
 (0)