Closed idelfonsog2 closed 11 months ago
Expected my lambda to return a APIGatewayV2Response along with my body
Found the following in the CloudWatch Logs
2022-04-25T15:40:54+0000 warning Lambda : lifecycleIteration=1 lambda handler returned an error: requestDecoding(Swift.DecodingError.keyNotFound(CodingKeys(stringValue: "version", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"version\", intValue: nil) (\"version\").", underlyingError: nil)))
Deployment
serverless.yml
service: helloworld-swift-aws provider: name: aws runtime: provided region: us-east-2 package: artifact: .build/lambda/HelloWorld/lambda.zip functions: hello: handler: HelloWorld memorySize: 128 events: - http: method: ANY path: /{proxy+} cors: true
main branch
main
swift --version && uname -a
Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) MacOS Monterrey 12.3.1
I create a PR #16
I think this issue can be closed @tomerd @tachyonics
fixed via #18
Expected behavior
Expected my lambda to return a APIGatewayV2Response along with my body
Actual behavior
Found the following in the CloudWatch Logs
Steps to reproduce
Deployment
Lambda found in the Examples dir and deployed to AWS using APIGateway with a Lambda_PROXYIf possible, minimal yet complete reproducer code (or URL to code)
serverless.yml
SwiftAWSLambdaRuntime version/commit hash
main
branchSwift & OS version (output of
swift --version && uname -a
)Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8) MacOS Monterrey 12.3.1