Skip to content

Commit 352adb7

Browse files
committed
feat: apply relevent changes
1 parent 94b1ec7 commit 352adb7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cmd/localstack/custom_interop.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/interop"
1919
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/rapidcore"
2020
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/rapidcore/standalone"
21-
"github.com/go-chi/chi"
21+
"github.com/go-chi/chi/v5"
2222
log "github.com/sirupsen/logrus"
2323
)
2424

@@ -52,7 +52,7 @@ func (l *LocalStackAdapter) SendStatus(status LocalStackStatus, payload []byte)
5252

5353
// The InvokeRequest is sent by LocalStack to trigger an invocation
5454
type InvokeRequest struct {
55-
InvokeId string `json:"invoke-id"`
55+
InvokeId string `json:"request-id"`
5656
InvokedFunctionArn string `json:"invoked-function-arn"`
5757
Payload string `json:"payload"`
5858
TraceId string `json:"trace-id"`

cmd/localstack/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212

1313
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/interop"
1414
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/rapidcore"
15+
"github.com/aws/aws-lambda-runtime-interface-emulator/internal/lambda/rie"
1516
log "github.com/sirupsen/logrus"
1617
)
1718

@@ -244,7 +245,7 @@ func main() {
244245
// start runtime init. It is important to start `InitHandler` synchronously because we need to ensure the
245246
// notification channels and status fields are properly initialized before `AwaitInitialized`
246247
log.Debugln("Starting runtime init.")
247-
InitHandler(sandbox.LambdaInvokeAPI(), GetEnvOrDie("AWS_LAMBDA_FUNCTION_VERSION"), int64(invokeTimeoutSeconds), bootstrap, lsOpts.AccountId) // TODO: replace this with a custom init
248+
rie.InitHandler(sandbox.LambdaInvokeAPI(), GetEnvOrDie("AWS_LAMBDA_FUNCTION_VERSION"), int64(invokeTimeoutSeconds), bootstrap) // TODO: replace this with a custom init
248249

249250
log.Debugln("Awaiting initialization of runtime init.")
250251
if err := interopServer.delegate.AwaitInitialized(); err != nil {

internal/lambda/interop/model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ type ErrorResponseTooLargeDI struct {
360360

361361
// ErrorResponseTooLarge is returned when response provided by Runtime does not fit into shared memory buffer
362362
func (s *ErrorResponseTooLarge) Error() string {
363-
return fmt.Sprintf("Response payload size (%d bytes) exceeded maximum allowed payload size (%d bytes).", s.ResponseSize, s.MaxResponseSize)
363+
return fmt.Sprintf("Response payload size exceeded maximum allowed payload size (%d bytes).", s.MaxResponseSize)
364364
}
365365

366366
// AsErrorResponse generates ErrorInvokeResponse from ErrorResponseTooLarge

0 commit comments

Comments
 (0)