Skip to content

bug: Lambda client context not passed to function #11053

Open
@mcieno

Description

@mcieno

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When invoking a (nodejs20.x) Lambda with a client context, the context.clientContext field is not populated.

Expected Behavior

context.clientContext field to be populated with the base64-decoded and json-parsed input.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack

# compose.yml
services:
  aws:
    image: localstack/localstack:3.5
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "4566:4566"
    environment:
      LS_LOG: trace
      SERVICES: "lambda"
      ALLOW_NONSTANDARD_REGIONS: 1
      LAMBDA_IGNORE_ARCHITECTURE: 1

Client commands

Create the following Node.js Lambda function:

exports.handler = async (event, context) => {
    return { event, context };
}
# Create the function
echo '
    exports.handler = async (event, context) => {
        return { event, context };
    }
' > index.js
zip -X -0 lambda.zip index.js

awslocal lambda create-function \
    --architectures "$(uname -i | sed s/aarch/arm/)" \
    --function-name "test" \
    --handler "index.handler" \
    --role "arn:aws:iam::000000000000:role/lambda-role" \
    --runtime "nodejs20.x" \
    --zip-file "fileb://lambda.zip"

Then invoke it with some client context:

awslocal lambda invoke \
    --function-name "test" \
    --client-context "$(echo '{"Custom":{"foo":"bar"},"client":{"snap":["crackle","pop"]},"env":{"fizz":"buzz"}}' | base64 -w 0)" \
    --payload "$(echo '{"bar":"qux"}' | base64 -w 0)" \
    /dev/stdout

The output is as follows, note there's no client context in context:

{
  "event": {
    "bar": "qux"
  },
  "context": {
    "callbackWaitsForEmptyEventLoop": true,
    "functionVersion": "$LATEST",
    "functionName": "test",
    "memoryLimitInMB": "128",
    "logGroupName": "/aws/lambda/test",
    "logStreamName": "2024/06/19/[$LATEST]eaf7693a8cb36d7718851dee6f25080d",
    "invokedFunctionArn": "arn:aws:lambda:dev-local-1:000000000000:function:test",
    "awsRequestId": "47a56393-01e9-4bf9-bb40-5823c13f56ce"
  }
}

Environment

- OS: Ubuntu 22.04.3 LTS
- LocalStack:
  LocalStack version: v3.5.0
  LocalStack Docker image sha: `sha256:c0d346a4b726f167e16451d01a217dfe17f07994ac30f7ab61b57aa321b3e4d6`
  LocalStack build date: 2024-06-13
  LocalStack build git hash: 54edb407d

Anything else?

Useful references

  • https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html
  • # TODO: implement in new provider (was tested in old provider)
    @pytest.mark.skip(reason="Not yet implemented")
    @markers.aws.validated
    def test_lambda_with_context(
    self, create_lambda_function, check_lambda_logs, snapshot, aws_client
    ):
    """Test context of nodejs lambda invocation"""
    function_name = f"test-function-{short_uid()}"
    creation_response = create_lambda_function(
    func_name=function_name,
    handler_file=TEST_LAMBDA_INTEGRATION_NODEJS,
    handler="lambda_integration.handler",
    runtime=Runtime.nodejs20_x,
    )
    snapshot.match("creation", creation_response)
    ctx = {
    "custom": {"foo": "bar"},
    "client": {"snap": ["crackle", "pop"]},
    "env": {"fizz": "buzz"},
    }
    result = aws_client.lambda_.invoke(
    FunctionName=function_name,
    Payload=b"{}",
    ClientContext=to_str(base64.b64encode(to_bytes(json.dumps(ctx)))),
    )
    result = read_streams(result)
    snapshot.match("invocation", result)
    result_data = result["Payload"]
    assert 200 == result["StatusCode"]
    client_context = json.loads(result_data)["context"]["clientContext"]
    assert "bar" == client_context.get("custom").get("foo")
    # assert that logs are present
    expected = [".*Node.js Lambda handler executing."]
    def check_logs():
    check_lambda_logs(function_name, expected_lines=expected)
    retry(check_logs, retries=15)

Debug logs

DEBUG --- [  MainThread] l.utils.docker_utils       : Using SdkDockerClient. LEGACY_DOCKER_CLIENT: False, SDK installed: True
 WARN --- [  MainThread] l.services.internal        : Enabling diagnose endpoint, please be aware that this can expose sensitive information via your network.
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.runtime.components.aws = <class 'localstack.aws.components.AwsComponents'>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.runtime.components:aws

LocalStack version: 3.5.0
LocalStack build date: 2024-06-13
LocalStack build git hash: 54edb407d

DEBUG --- [  MainThread] localstack.utils.run       : Executing command: rm -rf "/tmp/localstack"
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start._patch_botocore_json_parser = <function _patch_botocore_json_parser at 0xffffb54c1bc0>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:_patch_botocore_json_parser
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start._publish_config_as_analytics_event = <function _publish_config_as_analytics_event at 0xffffb4d95c60>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:_publish_config_as_analytics_event
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start._publish_container_info = <function _publish_container_info at 0xffffb4d95f80>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:_publish_container_info
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start._run_init_scripts_on_start = <function _run_init_scripts_on_start at 0xffffb4d96f20>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:_run_init_scripts_on_start
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.apply_aws_runtime_patches = <function apply_aws_runtime_patches at 0xffffb4d97560>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:apply_aws_runtime_patches
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.apply_runtime_patches = <function apply_runtime_patches at 0xffffb4d979c0>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:apply_runtime_patches
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.deprecation_warnings = <function deprecation_warnings at 0xffffb4d97e20>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:deprecation_warnings
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.register_cloudformation_deploy_ui = <function register_cloudformation_deploy_ui at 0xffffb4db80e0>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:register_cloudformation_deploy_ui
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.register_custom_endpoints = <function register_custom_endpoints at 0xffffb4c5a480>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:register_custom_endpoints
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.register_partition_adjusting_proxy_listener = <function register_partition_adjusting_proxy_listener at 0xffffb4d97ce0>)
DEBUG --- [  MainThread] plux.runtime.manager       : plugin localstack.hooks.on_infra_start:register_partition_adjusting_proxy_listener is disabled, reason: Load condition for plugin was false
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.setup_dns_configuration_on_host = <function setup_dns_configuration_on_host at 0xffffb4c5a8e0>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:setup_dns_configuration_on_host
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.start_dns_server = <function start_dns_server at 0xffffb4c5a7a0>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:start_dns_server
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_start.validate_configuration = <function validate_configuration at 0xffffb4c5a340>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_start:validate_configuration
DEBUG --- [  MainThread] localstack.dns.server      : Determined fallback dns: 127.0.0.11
DEBUG --- [  MainThread] localstack.dns.server      : Starting DNS servers (tcp/udp port 53 on 0.0.0.0)...
DEBUG --- [  MainThread] localstack.dns.server      : Adding host .*localhost.localstack.cloud pointing to LocalStack
DEBUG --- [  MainThread] localstack.dns.server      : Adding host .*localhost.localstack.cloud with record DynamicRecord(record_type=<RecordType.A: 1>, record_id=None)
DEBUG --- [  MainThread] localstack.dns.server      : Adding host .*localhost.localstack.cloud with record DynamicRecord(record_type=<RecordType.AAAA: 2>, record_id=None)
DEBUG --- [-functhread1] localstack.dns.server      : DNS Server started
DEBUG --- [  MainThread] localstack.dns.server      : DNS server startup finished.
DEBUG --- [  MainThread] localstack.runtime.init    : Init scripts discovered: {BOOT: [], START: [], READY: [], SHUTDOWN: []}
DEBUG --- [  MainThread] localstack.plugins         : Checking for the usage of deprecated community features and configs...
DEBUG --- [  MainThread] localstack.dns.server      : Overwriting container DNS server to point to localhost
DEBUG --- [  MainThread] localstack.utils.ssl       : Attempting to download local SSL certificate file
DEBUG --- [  MainThread] localstack.utils.http      : Starting download from https://github.com/localstack/localstack-artifacts/raw/master/local-certs/server.key to /var/lib/localstack/cache/server.test.pem
DEBUG --- [  MainThread] localstack.utils.http      : Downloaded 100% (total 4K of 4K) to /var/lib/localstack/cache/server.test.pem
DEBUG --- [  MainThread] localstack.utils.http      : Done downloading https://github.com/localstack/localstack-artifacts/raw/master/local-certs/server.key, response code 200, total 4K
DEBUG --- [  MainThread] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.runtime.server.twisted = <class 'localstack.runtime.server.plugins.TwistedRuntimeServerPlugin'>)
DEBUG --- [  MainThread] plux.runtime.manager       : loading plugin localstack.runtime.server:twisted
DEBUG --- [ady_monitor)] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_ready._run_init_scripts_on_ready = <function _run_init_scripts_on_ready at 0xffffb4d97060>)
DEBUG --- [ady_monitor)] plux.runtime.manager       : loading plugin localstack.hooks.on_infra_ready:_run_init_scripts_on_ready
DEBUG --- [ady_monitor)] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.hooks.on_infra_ready.register_virtual_host_routes = <function register_virtual_host_routes at 0xffffb0c7d620>)
DEBUG --- [ady_monitor)] plux.runtime.manager       : plugin localstack.hooks.on_infra_ready:register_virtual_host_routes is disabled, reason: Load condition for plugin was false
Ready.
DEBUG --- [et.reactor-0] l.a.p.service_router       : building service catalog index cache file /var/lib/localstack/cache/service-catalog-3_5_0-1_34_122.pickle
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : POST localhost:4566/2015-03-31/functions
DEBUG --- [et.reactor-0] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.aws.provider.lambda:default = <function lambda_ at 0xffff83784040>)
DEBUG --- [et.reactor-0] plux.runtime.manager       : loading plugin localstack.aws.provider:lambda:default
DEBUG --- [et.reactor-0] l.s.lambda_.urlrouter      : Registering parameterized Lambda routes.
DEBUG --- [et.reactor-0] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.lambda.runtime_executor.docker = <class 'localstack.services.lambda_.invocation.plugins.DockerRuntimeExecutorPlugin'>)
DEBUG --- [et.reactor-0] plux.runtime.manager       : loading plugin localstack.lambda.runtime_executor:docker
DEBUG --- [et.reactor-1] rolo.gateway.wsgi          : POST localhost:4566/
DEBUG --- [et.reactor-1] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.aws.provider.sts:default = <function sts at 0xffff83b47c40>)
DEBUG --- [et.reactor-1] plux.runtime.manager       : loading plugin localstack.aws.provider:sts:default
DEBUG --- [et.reactor-1] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
 INFO --- [et.reactor-1] l.request.internal.aws     : AWS sts.AssumeRole => 200
DEBUG --- [et.reactor-1] rolo.gateway.wsgi          : PUT s3.localhost.localstack.cloud:4566/awslambda-dev-local-1-tasks
DEBUG --- [et.reactor-1] plux.runtime.manager       : instantiating plugin PluginSpec(localstack.aws.provider.s3:default = <function s3 at 0xffff83784e00>)
DEBUG --- [et.reactor-1] plux.runtime.manager       : loading plugin localstack.aws.provider:s3:default
DEBUG --- [et.reactor-1] l.aws.protocol.serializer  : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/xml
 INFO --- [et.reactor-1] l.request.internal.aws     : AWS s3.CreateBucket => 200
DEBUG --- [et.reactor-1] rolo.gateway.wsgi          : PUT s3.localhost.localstack.cloud:4566/awslambda-dev-local-1-tasks/snapshots/000000000000/test-47a1eba5-29f4-47ec-a90a-b5462bd2fdf5
DEBUG --- [et.reactor-1] l.aws.protocol.serializer  : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/xml
 INFO --- [et.reactor-1] l.request.internal.aws     : AWS s3.PutObject => 200
DEBUG --- [rvice-task_0] l.s.l.invocation.logs      : Service 'logs' is disabled, not storing any logs for lambda executions
DEBUG --- [et.reactor-0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/json) as preferred response Content-Type.
 INFO --- [et.reactor-0] localstack.request.aws     : AWS lambda.CreateFunction => 201; 000000000000/dev-local-1; CreateFunctionRequest(None, headers={'Host': 'localhost:4566', 'Accept-Encoding': 'identity', 'Content-Type': 'application/json', 'User-Agent': 'aws-cli/2.15.2 Python/3.11.6 Linux/5.15.0-105-generic exe/aarch64.ubuntu.22 prompt/off command/lambda.create-function', 'X-Amz-Date': '20240619T121321Z', 'Authorization': 'AWS4-HMAC-SHA256 Credential=access/20240619/dev-local-1/lambda/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=a618c05361292991a08fcacc8ae6c5c9bbe13b2018a14b342fec19532377a81f', 'Content-Length': '480', 'x-moto-account-id': '000000000000'}); FunctionConfiguration(None, headers={'Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '974', 'x-amzn-requestid': 'f092e848-febb-4cd6-81b6-d961f4c56df3', 'x-amz-request-id': 'f092e848-febb-4cd6-81b6-d961f4c56df3'})
DEBUG --- [rvice-task_0] localstack.packages.api    : Installation of lambda-runtime skipped (already installed).
DEBUG --- [rvice-task_0] localstack.packages.api    : Performing runtime setup for already installed package.
DEBUG --- [rvice-task_0] l.s.l.i.lambda_models      : Saving code test-47a1eba5-29f4-47ec-a90a-b5462bd2fdf5 to disk
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : HEAD s3.localhost.localstack.cloud:4566/awslambda-dev-local-1-tasks/snapshots/000000000000/test-47a1eba5-29f4-47ec-a90a-b5462bd2fdf5
DEBUG --- [et.reactor-0] l.aws.protocol.serializer  : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/xml
 INFO --- [et.reactor-0] l.request.internal.aws     : AWS s3.HeadObject => 200
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : GET s3.localhost.localstack.cloud:4566/awslambda-dev-local-1-tasks/snapshots/000000000000/test-47a1eba5-29f4-47ec-a90a-b5462bd2fdf5
DEBUG --- [et.reactor-0] l.aws.protocol.serializer  : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/xml
 INFO --- [et.reactor-0] l.request.internal.aws     : AWS s3.GetObject => 200
DEBUG --- [rvice-task_0] localstack.utils.run       : Executing command: ['unzip', '-o', '-q', '/tmp/tmpd20dxwon']
DEBUG --- [rvice-task_0] l.u.c.docker_sdk_client    : Pulling Docker image: public.ecr.aws/lambda/nodejs:20
DEBUG --- [rvice-task_0] l.s.l.i.version_manager    : Version preparation of function arn:aws:lambda:dev-local-1:000000000000:function:test:$LATEST took 1539.66ms
DEBUG --- [rvice-task_0] l.s.l.i.version_manager    : Changing Lambda arn:aws:lambda:dev-local-1:000000000000:function:test:$LATEST (id a3f7f0f6) to active
DEBUG --- [rvice-task_0] l.s.l.i.event_manager      : Starting event manager arn:aws:lambda:dev-local-1:000000000000:function:test:$LATEST id 281472834445840
DEBUG --- [et.reactor-1] rolo.gateway.wsgi          : POST localhost:4566/2015-03-31/functions/test/invocations
DEBUG --- [et.reactor-1] l.s.l.i.version_manager    : Got an invocation for function arn:aws:lambda:dev-local-1:000000000000:function:test:$LATEST with request_id 47a56393-01e9-4bf9-bb40-5823c13f56ce
DEBUG --- [et.reactor-1] l.s.l.i.assignment         : Starting new environment
DEBUG --- [et.reactor-1] l.s.l.i.docker_runtime_exe : Assigning container name of ubuntu-aws-1-lambda-test-eaf7693a8cb36d7718851dee6f25080d to executor eaf7693a8cb36d7718851dee6f25080d
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : POST localhost:4566/
DEBUG --- [et.reactor-0] l.aws.protocol.serializer  : No accept header given. Using request's Content-Type (application/x-www-form-urlencoded; charset=utf-8) as preferred response Content-Type.
 INFO --- [et.reactor-0] l.request.internal.aws     : AWS sts.AssumeRole => 200
DEBUG --- [et.reactor-1] l.u.c.container_client     : Getting networks for container: ubuntu-aws-1
 INFO --- [et.reactor-1] l.u.container_networking   : Determined main container network: ubuntu_default
DEBUG --- [et.reactor-1] l.u.c.container_client     : Getting ipv4 address for container ubuntu-aws-1 in network ubuntu_default.
 INFO --- [et.reactor-1] l.u.container_networking   : Determined main container target IP: 172.23.0.2
DEBUG --- [et.reactor-1] l.u.c.docker_sdk_client    : Creating container with attributes: {'self': <localstack.utils.container_utils.docker_sdk_client.SdkDockerClient object at 0xffffb56dcc10>, 'image_name': 'public.ecr.aws/lambda/nodejs:20', 'name': 'ubuntu-aws-1-lambda-test-eaf7693a8cb36d7718851dee6f25080d', 'entrypoint': '/var/rapid/init', 'remove': False, 'interactive': False, 'tty': False, 'detach': False, 'command': None, 'mount_volumes': [], 'ports': <PortMappings: {}>, 'exposed_ports': [], 'env_vars': {'AWS_DEFAULT_REGION': 'dev-local-1', 'AWS_REGION': 'dev-local-1', 'AWS_LAMBDA_FUNCTION_NAME': 'test', 'AWS_LAMBDA_FUNCTION_MEMORY_SIZE': 128, 'AWS_LAMBDA_FUNCTION_VERSION': '$LATEST', 'AWS_LAMBDA_INITIALIZATION_TYPE': 'on-demand', 'AWS_LAMBDA_LOG_GROUP_NAME': '/aws/lambda/test', 'AWS_LAMBDA_LOG_STREAM_NAME': '2024/06/19/[$LATEST]eaf7693a8cb36d7718851dee6f25080d', 'AWS_ACCESS_KEY_ID': 'ASIAQAAAAAAALSF56UYT', 'AWS_SECRET_ACCESS_KEY': '6tPoAWh+Uu7EIw7x5HfZV9rRtWCuw2BmIsKhLtzv', 'AWS_SESSION_TOKEN': 'FQoGZXIvYXdzEBYaDGDVE5Is34bBLUjBDH+r/+zE2h2Vmuk5qajy54kid7QBeae6sT8v2TRRdCkD7fgVLPIwdi4pOXrG6qDPKD+k5bOdTLcYSqAsYYU+5oK00mGwTUc2mvkr3+tLysDD6wmAg5h+Ad9xl6jsCqCxY0usqAkp6BPSf9zcpZNZllGcx2xz9ujWnFNrXON4+f09onDLK44A2vPa1ffWCHGMqBi4Z4iC6SRaho3IJlAngdFZrCxaCyUwKhMNx2TxEkhWhwgas5CF3TD4TaI0PT9SYRSOqnnAy/LJPfiP5R8oMYEvKkt9Pf7S62lYhoLbeyXrW4sKvg8UmyQJIu1pKdnMOwQ=', 'LAMBDA_TASK_ROOT': '/var/task', 'LAMBDA_RUNTIME_DIR': '/var/runtime', 'AWS_XRAY_CONTEXT_MISSING': 'LOG_ERROR', 'AWS_XRAY_DAEMON_ADDRESS': '127.0.0.1:2000', '_AWS_XRAY_DAEMON_PORT': '2000', '_AWS_XRAY_DAEMON_ADDRESS': '127.0.0.1', 'TZ': ':UTC', 'AWS_LAMBDA_FUNCTION_TIMEOUT': 3, 'LOCALSTACK_HOSTNAME': '172.23.0.2', 'EDGE_PORT': '4566', 'LOCALSTACK_RUNTIME_ID': 'eaf7693a8cb36d7718851dee6f25080d', 'LOCALSTACK_RUNTIME_ENDPOINT': 'http://172.23.0.2:4566/_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d', 'LOCALSTACK_FUNCTION_ACCOUNT_ID': '000000000000', 'AWS_ENDPOINT_URL': 'http://172.23.0.2:4566', '_HANDLER': 'index.handler', 'AWS_EXECUTION_ENV': 'AWS_Lambda_rapid', 'LOCALSTACK_INIT_LOG_LEVEL': 'debug', 'LOCALSTACK_MAX_PAYLOAD_SIZE': 6291556, 'LOCALSTACK_CHMOD_PATHS': '[{"path": "/tmp", "mode": "0700"}]'}, 'user': None, 'cap_add': None, 'cap_drop': None, 'security_opt': None, 'network': 'ubuntu_default', 'dns': '172.23.0.2', 'additional_flags': '', 'workdir': None, 'privileged': False, 'labels': None, 'platform': None, 'ulimits': None, 'init': None}
DEBUG --- [et.reactor-1] l.u.c.docker_sdk_client    : Copying file /usr/lib/localstack/lambda-runtime/v0.1.28-pre/arm64/. into ubuntu-aws-1-lambda-test-eaf7693a8cb36d7718851dee6f25080d:/
DEBUG --- [et.reactor-1] l.u.c.docker_sdk_client    : Copying file /tmp/lambda/awslambda-dev-local-1-tasks/test-47a1eba5-29f4-47ec-a90a-b5462bd2fdf5/code/. into ubuntu-aws-1-lambda-test-eaf7693a8cb36d7718851dee6f25080d:/var/task
DEBUG --- [et.reactor-1] l.u.c.docker_sdk_client    : Starting container ubuntu-aws-1-lambda-test-eaf7693a8cb36d7718851dee6f25080d
DEBUG --- [et.reactor-1] l.u.c.container_client     : Getting ipv4 address for container ubuntu-aws-1-lambda-test-eaf7693a8cb36d7718851dee6f25080d in network ubuntu_default.
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : POST 172.23.0.2:4566/_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d/status/eaf7693a8cb36d7718851dee6f25080d/ready
 INFO --- [et.reactor-0] localstack.request.http    : POST /_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d/status/eaf7693a8cb36d7718851dee6f25080d/ready => 202; Request(None, headers={'Host': '172.23.0.2:4566', 'User-Agent': 'Go-http-client/1.1', 'Content-Length': '0', 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip'}); Response(None, headers={'Content-Type': 'text/plain; charset=utf-8'})
DEBUG --- [et.reactor-1] l.s.l.i.execution_environm : Start of execution environment eaf7693a8cb36d7718851dee6f25080d for function arn:aws:lambda:dev-local-1:000000000000:function:test:$LATEST took 446.37ms
DEBUG --- [et.reactor-1] l.s.l.i.docker_runtime_exe : Sending invoke-payload '{"invoke-id": "47a56393-01e9-4bf9-bb40-5823c13f56ce", "invoked-function-arn": "arn:aws:lambda:dev-local-1:000000000000:function:test", "payload": "{\"bar\":\"qux\"}\n", "trace-id": "Root=1-6672cb77-153066f384c5b47ee33597d3;Parent=93aee9146dc583c7;Sampled=0"}' to executor 'eaf7693a8cb36d7718851dee6f25080d'
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : POST 172.23.0.2:4566/_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d/invocations/47a56393-01e9-4bf9-bb40-5823c13f56ce/logs
 INFO --- [et.reactor-0] localstack.request.http    : POST /_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d/invocations/47a56393-01e9-4bf9-bb40-5823c13f56ce/logs => 202; Request(None, headers={'Host': '172.23.0.2:4566', 'User-Agent': 'Go-http-client/1.1', 'Content-Length': '282', 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip'}); Response(None, headers={'Content-Type': 'text/plain; charset=utf-8'})
DEBUG --- [et.reactor-0] rolo.gateway.wsgi          : POST 172.23.0.2:4566/_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d/invocations/47a56393-01e9-4bf9-bb40-5823c13f56ce/response
 INFO --- [et.reactor-0] localstack.request.http    : POST /_localstack_lambda/eaf7693a8cb36d7718851dee6f25080d/invocations/47a56393-01e9-4bf9-bb40-5823c13f56ce/response => 202; Request(None, headers={'Host': '172.23.0.2:4566', 'User-Agent': 'Go-http-client/1.1', 'Content-Length': '383', 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip'}); Response(None, headers={'Content-Type': 'text/plain; charset=utf-8'})
DEBUG --- [et.reactor-1] l.s.l.i.version_manager    : Got logs for invocation '47a56393-01e9-4bf9-bb40-5823c13f56ce'
DEBUG --- [et.reactor-1] l.s.l.i.version_manager    : [test-47a56393-01e9-4bf9-bb40-5823c13f56ce] START RequestId: 47a56393-01e9-4bf9-bb40-5823c13f56ce Version: $LATEST
DEBUG --- [et.reactor-1] l.s.l.i.version_manager    : [test-47a56393-01e9-4bf9-bb40-5823c13f56ce] END RequestId: 47a56393-01e9-4bf9-bb40-5823c13f56ce
DEBUG --- [et.reactor-1] l.s.l.i.version_manager    : [test-47a56393-01e9-4bf9-bb40-5823c13f56ce] REPORT RequestId: 47a56393-01e9-4bf9-bb40-5823c13f56ce	Duration: 2.15 ms	Billed Duration: 3 ms	Memory Size: 128 MB	Max Memory Used: 128 MB
DEBUG --- [et.reactor-1] l.s.lambda_.provider       : Lambda invocation duration: 456.82ms
DEBUG --- [et.reactor-1] l.aws.protocol.serializer  : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/json
 INFO --- [et.reactor-1] localstack.request.aws     : AWS lambda.Invoke => 200; 000000000000/dev-local-1; InvocationRequest(None, headers={'Host': 'localhost:4566', 'Accept-Encoding': 'identity', 'X-Amz-Client-Context': 'eyJjdXN0b20iOnsiZm9vIjoiYmFyIn0sImNsaWVudCI6eyJzbmFwIjpbImNyYWNrbGUiLCJwb3AiXX0sImVudiI6eyJmaXp6IjoiYnV6eiJ9fQo=', 'User-Agent': 'aws-cli/2.15.2 Python/3.11.6 Linux/5.15.0-105-generic exe/aarch64.ubuntu.22 prompt/off command/lambda.invoke', 'X-Amz-Date': '20240619T121343Z', 'Authorization': 'AWS4-HMAC-SHA256 Credential=access/20240619/dev-local-1/lambda/aws4_request, SignedHeaders=host;x-amz-client-context;x-amz-date, Signature=24e562357a003a551375c6a75d90469db239ead67f30d8bf49d60399e4afee61', 'Content-Length': '14', 'x-moto-account-id': '000000000000'}); InvocationResponse(None, headers={'Content-Type': 'text/plain; charset=utf-8', 'X-Amz-Executed-Version': '$LATEST', 'Content-Length': '383', 'x-amzn-requestid': '47a56393-01e9-4bf9-bb40-5823c13f56ce', 'x-amz-request-id': '47a56393-01e9-4bf9-bb40-5823c13f56ce'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws:lambdaAWS Lambdastatus: backlogTriaged but not yet being worked ontype: featureNew feature, or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions