Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aws/aws-lambda-python-runtime-interface-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 149ce3a
Choose a base ref
...
head repository: aws/aws-lambda-python-runtime-interface-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3f43f4d
Choose a head ref

Commits on Jan 12, 2021

  1. Add leading zeros to the milliseconds part of a log timestamp

    Alexander Smirnov committed Jan 12, 2021
    Copy the full SHA
    d2be0c0 View commit details

Commits on Jun 7, 2021

  1. Copy the full SHA
    aa34869 View commit details

Commits on Jul 22, 2021

  1. Copy the full SHA
    d11d485 View commit details
  2. Update patch version for release

    preearor authored and carlzogh committed Jul 22, 2021
    Copy the full SHA
    56eb1ca View commit details

Commits on Aug 10, 2021

  1. Update Curl to 7.78.0

    Pushkar Chawda committed Aug 10, 2021
    Copy the full SHA
    1b440a6 View commit details
  2. Copy the full SHA
    67ff94e View commit details

Commits on Aug 20, 2021

  1. Remove importlib.metadata dependency (#55)

    Co-authored-by: Carl Zogheib <11421173+carlzogh@users.noreply.github.com>
    aboelhamd and carlzogh authored Aug 20, 2021
    Copy the full SHA
    c92c8ad View commit details

Commits on Sep 7, 2021

  1. Copy the full SHA
    0cd10a8 View commit details

Commits on Sep 22, 2021

  1. Merge pull request #52 from pushkarchawda/main

    Update Curl to 7.78.0
    keshayad authored Sep 22, 2021
    Copy the full SHA
    386c124 View commit details

Commits on Sep 29, 2021

  1. Copy the full SHA
    f542d32 View commit details
  2. Update README.md

    keshayad committed Sep 29, 2021
    Copy the full SHA
    c4b7ffd View commit details
  3. Merge pull request #59 from keshayad/main

    Add ARM64 architecture support
    keshayad authored Sep 29, 2021
    Copy the full SHA
    a94d6e2 View commit details

Commits on Nov 26, 2021

  1. Merge pull request #39 from flarcher/fix-install-from-CI-container-wi…

    …th-root-user
    
    (#37) Adds '--no-same-owner' option to all scripts tar commands
    SukanyaHanumanthu authored Nov 26, 2021
    Copy the full SHA
    a6524b0 View commit details

Commits on Jan 4, 2022

  1. Bump version to 2.0.1

    krk authored Jan 4, 2022
    Copy the full SHA
    d8302de View commit details
  2. Merge pull request #64 from aws/bump-2.0.1

    Bump version to 2.0.1
    SukanyaHanumanthu authored Jan 4, 2022
    Copy the full SHA
    48f885a View commit details

Commits on Mar 29, 2022

  1. Merge pull request #56 from p4n1c/main

    Using the raw fd directly rather than opening the fd pseudo file
    zsombor-balogh authored Mar 29, 2022
    Copy the full SHA
    2963d0e View commit details
  2. Merge pull request #13 from smirnoal/main

    Add leading zeros to the milliseconds part of a log timestamp
    smirnoal authored Mar 29, 2022
    Copy the full SHA
    a94ffb1 View commit details

Commits on Apr 2, 2022

  1. Copy the full SHA
    477f16c View commit details
  2. Run linter

    keshayad committed Apr 2, 2022
    Copy the full SHA
    27084c3 View commit details
  3. Refix linting issues

    keshayad committed Apr 2, 2022
    Copy the full SHA
    271cdf6 View commit details

Commits on Apr 4, 2022

  1. Merge pull request #71 from keshayad/main

    Update patch version to v2.0.2
    keshayad authored Apr 4, 2022
    Copy the full SHA
    320dfc8 View commit details

Commits on Apr 28, 2022

  1. Copy the full SHA
    fa0b937 View commit details
  2. Merge pull request #72 from aws/hsukanya-curl-update

    Update Curl to 7.83.0
    SukanyaHanumanthu authored Apr 28, 2022
    Copy the full SHA
    675d1fd View commit details

Commits on May 4, 2022

  1. Fix libcurl download url (#74)

    * Fix libcurl download url
    
    * Fix indentation
    
    * Reformat code
    
    * Fix 'test_log_error_invokeId_line_framed_log_sink' test
    zsombor-balogh authored May 4, 2022
    Copy the full SHA
    86705d6 View commit details
  2. Add changelog (#75)

    zsombor-balogh authored May 4, 2022
    Copy the full SHA
    848186f View commit details
  3. Bump version to 2.0.3

    zsombor-balogh committed May 4, 2022
    Copy the full SHA
    a4a32f6 View commit details

Commits on May 24, 2022

  1. Update curl to 7.83.1 (#79)

    * Update curl to 7.83.1
    
    * Update attribution doc
    zsombor-balogh authored May 24, 2022
    Copy the full SHA
    0e176f5 View commit details

Commits on May 25, 2022

  1. Copy the full SHA
    cb7817c View commit details
  2. Copy the full SHA
    020fa7a View commit details
  3. Copy the full SHA
    15efe4e View commit details
  4. Copy the full SHA
    0da3a57 View commit details
  5. Merge pull request #80 from zsombor-balogh/distro-update

    Update os distro and runtime versions in compatibility tests
    keshayad authored May 25, 2022
    Copy the full SHA
    d27dc3f View commit details
  6. Copy the full SHA
    8ba913f View commit details

Commits on Jul 1, 2022

  1. Remove the importlib-metadata dependency

    This should complete a previous attempt to remove dependency on the
    package, unblocking use of `awslambdaric` in projects that use a newer
    version of `importlib-metadata`. Version 2 of `importlib-metadata` is
    reasonably old - version 4.4 is present in Python 3.10 for instance.
    
    Motivation for the change
    =========================
    I think issue #61 covers it well, but essentially it becomes difficult
    to use `awslambdaric` in a virtualenv with other dependencies that
    expect a newer version of `importlib-metadata`:
    
    #61
    
    `awslambdaric` isn't supposed to need `importlib-metadata` anyway
    =================================================================
    Previous work (in August of 2021, with version 1.2.2) removed all
    dependency on the `importlib-metadata` package, but accidentally left
    `importlib-metadata` as a full dependency of this package:
    
    - #55
    
    Most recent version still has `importlib-metadata` dependency
    =============================================================
    ```
    $ pip show awslambdaric
    Name: awslambdaric
    Version: 2.0.4
    ...
    Requires: importlib-metadata, simplejson
    ```
    DavidCain committed Jul 1, 2022
    Copy the full SHA
    cac88c1 View commit details

Commits on Jul 11, 2022

  1. Copy the full SHA
    281d312 View commit details

Commits on Aug 16, 2022

  1. Merge pull request #83 from DavidCain/more-completely-remove-importlib

    Remove the importlib-metadata dependency
    keshayad authored Aug 16, 2022
    Copy the full SHA
    970e9c1 View commit details

Commits on Oct 11, 2022

  1. Update simplejson to 3.17.6

    Fixes #62
    mdsakalu committed Oct 11, 2022
    Copy the full SHA
    6c81b94 View commit details
  2. Copy the full SHA
    44300b7 View commit details

Commits on Jan 9, 2023

  1. emit multi-line logs with timestamps

    Rupayan Ghosh committed Jan 9, 2023
    Copy the full SHA
    cbb069b View commit details

Commits on Jan 18, 2023

  1. black formatting

    Rupayan Ghosh committed Jan 18, 2023
    Copy the full SHA
    4b74229 View commit details
  2. fix tests

    Rupayan Ghosh committed Jan 18, 2023
    Copy the full SHA
    dc221a6 View commit details
  3. read timestamp in tests

    Rupayan Ghosh committed Jan 18, 2023
    Copy the full SHA
    50fddc4 View commit details

Commits on Feb 16, 2023

  1. Merge pull request #92 from thenewguy39/main

    Emit multi-line logs with timestamps
    briensea authored Feb 16, 2023
    Copy the full SHA
    97dee25 View commit details

Commits on May 22, 2023

  1. Add python3.10.

    briensea committed May 22, 2023
    Copy the full SHA
    eabc088 View commit details
  2. Add python3.11.

    briensea committed May 22, 2023
    Copy the full SHA
    13e2d05 View commit details

Commits on May 25, 2023

  1. Merge pull request #102 from briensea/feat-python3.10

    Add python3.10.
    briensea authored May 25, 2023
    Copy the full SHA
    87fb0ad View commit details
  2. Copy the full SHA
    5994648 View commit details

Commits on May 26, 2023

  1. Merge pull request #103 from briensea/feat-python3.11

    Add python3.11
    briensea authored May 26, 2023
    Copy the full SHA
    0161f76 View commit details

Commits on Jul 4, 2023

  1. Copy the full SHA
    f0e441d View commit details

Commits on Aug 9, 2023

  1. Merge pull request #104 from briensea/pr-template

    Create pull request template.
    briensea authored Aug 9, 2023
    Copy the full SHA
    7cb7413 View commit details
Showing with 2,011 additions and 846 deletions.
  1. +7 −0 .github/PULL_REQUEST_TEMPLATE.md
  2. +33 −7 .github/workflows/test-on-push-and-pr.yml
  3. +7 −0 .gitignore
  4. +1 −1 .pre-commit-config.yaml
  5. +6 −3 Makefile
  6. +9 −10 README.md
  7. +172 −0 RELEASE.CHANGELOG.md
  8. +3 −3 THIRD-PARTY-LICENSES
  9. +5 −0 awslambdaric/__init__.py
  10. +6 −2 awslambdaric/__main__.py
  11. +198 −73 awslambdaric/bootstrap.py
  12. +4 −1 awslambdaric/lambda_context.py
  13. +17 −0 awslambdaric/lambda_literals.py
  14. +80 −21 awslambdaric/lambda_runtime_client.py
  15. +3 −0 awslambdaric/lambda_runtime_exception.py
  16. +18 −0 awslambdaric/lambda_runtime_hooks_runner.py
  17. +139 −0 awslambdaric/lambda_runtime_log_utils.py
  18. +9 −2 awslambdaric/lambda_runtime_marshaller.py
  19. +4 −2 awslambdaric/runtime_client.cpp
  20. BIN deps/aws-lambda-cpp-0.2.6.tar.gz
  21. BIN deps/curl-7.77.0.tar.gz
  22. BIN deps/curl-7.83.1.tar.gz
  23. +39 −0 deps/patches/aws-lambda-cpp-add-tenant-id.patch
  24. +131 −0 deps/patches/libcurl-configure-template.patch
  25. +3 −1 deps/versions
  26. +2 −2 requirements/base.txt
  27. +1 −0 requirements/dev.txt
  28. +5 −2 scripts/preinstall.sh
  29. +14 −4 scripts/update_deps.sh
  30. +7 −5 setup.py
  31. +1 −1 tests/integration/codebuild-local/Dockerfile.agent
  32. +15 −8 tests/integration/codebuild-local/codebuild_build.sh
  33. +5 −2 tests/integration/codebuild-local/test_all.sh
  34. +0 −102 tests/integration/codebuild/buildspec.os.alpine.1.yml
  35. +35 −28 tests/integration/codebuild/{buildspec.os.alpine.2.yml → buildspec.os.alpine.yml}
  36. +33 −29 tests/integration/codebuild/{buildspec.os.amazonlinux.yml → buildspec.os.amazonlinux.2.yml}
  37. +35 −31 tests/integration/codebuild/{buildspec.os.centos.1.yml → buildspec.os.amazonlinux.2023.yml}
  38. +0 −101 tests/integration/codebuild/buildspec.os.centos.2.yml
  39. +36 −29 tests/integration/codebuild/buildspec.os.debian.yml
  40. +0 −100 tests/integration/codebuild/buildspec.os.ubuntu.1.yml
  41. +0 −99 tests/integration/codebuild/buildspec.os.ubuntu.2.yml
  42. +38 −33 tests/integration/codebuild/{buildspec.os.alpine.3.yml → buildspec.os.ubuntu.yml}
  43. +14 −15 tests/integration/docker/Dockerfile.echo.alpine
  44. +8 −5 tests/integration/docker/{Dockerfile.echo.amazonlinux → Dockerfile.echo.amazonlinux2}
  45. +31 −20 tests/integration/docker/{Dockerfile.echo.centos → Dockerfile.echo.amazonlinux2023}
  46. +4 −3 tests/integration/docker/Dockerfile.echo.debian
  47. +37 −31 tests/integration/docker/Dockerfile.echo.ubuntu
  48. BIN tests/integration/resources/aws-lambda-rie-arm64.tar.gz
  49. +481 −62 tests/test_bootstrap.py
  50. +17 −1 tests/test_lambda_context.py
  51. +185 −6 tests/test_lambda_runtime_client.py
  52. +48 −1 tests/test_lambda_runtime_marshaller.py
  53. +65 −0 tests/test_runtime_hooks.py
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_Issue #, if available:_

_Description of changes:_

_Target (OCI, Managed Runtime, both):_

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
40 changes: 33 additions & 7 deletions .github/workflows/test-on-push-and-pr.yml
Original file line number Diff line number Diff line change
@@ -11,12 +11,38 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
env:
GITHUB_WORKSPACE: /
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/checkout@v4
- name: Run 'pr' target
run: make pr

alpine:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run alpine integration tests
run: DISTRO=alpine make test-integ

amazonlinux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run amazonlinux integration tests
run: DISTRO=amazonlinux make test-integ

debian:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run debian integration tests
run: DISTRO=debian make test-integ

ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run ubuntu integration tests
run: DISTRO=ubuntu make test-integ
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@ generated.docker-compose.*.yml

tests/integration/resources/init

.idea

node_modules/
*.tsbuildinfo

@@ -146,3 +148,8 @@ cython_debug/

# Test files generated
tmp*.py

# dependencies
deps/artifacts/
deps/aws-lambda-cpp-*/
deps/curl-*/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@ repos:
rev: 19.3b0
hooks:
- id: black
language_version: python3.6
language_version: python3.9
exclude_types: ['markdown', 'ini', 'toml', 'rst']
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -17,11 +17,11 @@ setup-codebuild-agent:

.PHONY: test-smoke
test-smoke: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_one.sh tests/integration/codebuild/buildspec.os.alpine.1.yml alpine 3.12 3.8
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_one.sh tests/integration/codebuild/buildspec.os.alpine.yml alpine 3.15 3.9

.PHONY: test-integ
test-integ: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/.
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild/.

.PHONY: check-security
check-security:
@@ -41,7 +41,10 @@ dev: init test

# Verifications to run before sending a pull request
.PHONY: pr
pr: init check-format check-security dev test-smoke
pr: init check-format check-security dev

codebuild: setup-codebuild-agent
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild

.PHONY: clean
clean:
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,12 +5,12 @@ We have open-sourced a set of software packages, Runtime Interface Clients (RIC)
base images to be Lambda compatible.
The Lambda Runtime Interface Client is a lightweight interface that allows your runtime to receive requests from and send requests to the Lambda service.

The Lambda Python Runtime Interface Client is vended through [pip](https://pypi.org/project/awslambdaric).
The Lambda Python Runtime Interface Client is vended through [pip](https://pypi.org/project/awslambdaric).
You can include this package in your preferred base image to make that base image Lambda compatible.

## Requirements
The Python Runtime Interface Client package currently supports Python versions:
- 3.6.x up to and including 3.9.x
- 3.9.x up to and including 3.13.x

## Usage

@@ -19,7 +19,6 @@ First step is to choose the base image to be used. The supported Linux OS distri

- Amazon Linux 2
- Alpine
- CentOS
- Debian
- Ubuntu

@@ -58,7 +57,7 @@ Example Dockerfile (to keep the image light we use a multi-stage build):
# Define custom function directory
ARG FUNCTION_DIR="/function"

FROM python:buster as build-image
FROM public.ecr.aws/docker/library/python:buster as build-image

# Include global arg in this stage of the build
ARG FUNCTION_DIR
@@ -82,7 +81,7 @@ RUN pip install \
awslambdaric


FROM python:buster
FROM public.ecr.aws/docker/library/python:buster

# Include global arg in this stage of the build
ARG FUNCTION_DIR
@@ -104,18 +103,18 @@ def handler(event, context):

### Local Testing

To make it easy to locally test Lambda functions packaged as container images we open-sourced a lightweight web-server, Lambda Runtime Interface Emulator (RIE), which allows your function packaged as a container image to accept HTTP requests. You can install the [AWS Lambda Runtime Interface Emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator) on your local machine to test your function. Then when you run the image function, you set the entrypoint to be the emulator.
To make it easy to locally test Lambda functions packaged as container images we open-sourced a lightweight web-server, Lambda Runtime Interface Emulator (RIE), which allows your function packaged as a container image to accept HTTP requests. You can install the [AWS Lambda Runtime Interface Emulator](https://github.com/aws/aws-lambda-runtime-interface-emulator) on your local machine to test your function. Then when you run the image function, you set the entrypoint to be the emulator.

*To install the emulator and test your Lambda function*

1) From your project directory, run the following command to download the RIE from GitHub and install it on your local machine.
1) From your project directory, run the following command to download the RIE from GitHub and install it on your local machine.

```shell script
mkdir -p ~/.aws-lambda-rie && \
curl -Lo ~/.aws-lambda-rie/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie && \
chmod +x ~/.aws-lambda-rie/aws-lambda-rie
```
2) Run your Lambda image function using the docker run command.
2) Run your Lambda image function using the docker run command.

```shell script
docker run -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \
@@ -124,9 +123,9 @@ docker run -d -v ~/.aws-lambda-rie:/aws-lambda -p 9000:8080 \
/usr/local/bin/python -m awslambdaric app.handler
```

This runs the image as a container and starts up an endpoint locally at `http://localhost:9000/2015-03-31/functions/function/invocations`.
This runs the image as a container and starts up an endpoint locally at `http://localhost:9000/2015-03-31/functions/function/invocations`.

3) Post an event to the following endpoint using a curl command:
3) Post an event to the following endpoint using a curl command:

```shell script
curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'
172 changes: 172 additions & 0 deletions RELEASE.CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
### May 26, 2025
`3.1.1`
- Move unhandled exception warning message to init errors. ([#189](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/189))

### May 21, 2025
`3.1.0`
- Add support for multi tenancy ([#187](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/187))

### February 27, 2024
`3.0.2`
- Update `simplejson` to `3.20.1`([#184](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/184))

### January 27, 2024
`3.0.1`
- Don't enforce text format on uncaught exception warning message ([#182](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/182))

### November 19, 2024
`3.0.0`
- Drop support for deprecated python versions ([#179](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/179))
- Add support for snapstart runtime hooks ([#176](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/176))

### August 23, 2024
`2.2.1`:
- Patch libcurl configure.ac to work with later versions of autoconf ([#166](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/168))

### August 8, 2024

`2.2.0`:

- Propogate error type in header when reporting init error to RAPID ([#166](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/166))

### July 31, 2024

`2.1.0`:

- Raise all init errors in init instead of suppressing them until the first invoke ([#163](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/163))

### June 19, 2024

`2.0.12`:

- Relax simplejson dependency and keep it backwards compatible ([#153](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/152))

### March 27, 2024

`2.0.11`:

- Upgrade simplejson to 3.18.4 ([#136](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/136))

### February 13, 2024

`2.0.10`:

- Update format of unhandled exception warning message. ([#132](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/132))

### February 01, 2024

`2.0.9`:

- Log warning on unhandled exceptions. ([#120](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/120))

### October 30, 2023

`2.0.8`:

- Onboarded Python3.12 ([#118](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/118))
- Fix runtime_client blocking main thread from SIGTERM being handled. Enabled by default only for Python3.12 ([#115](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/115)) ([#124](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/124)) ([#125](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/125))
- Use unicode chars instead of escape sequences in json encoder output. Enabled by default only for Python3.12 ([#88](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/88)) ([#122](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/122))
- Cold start improvements ([#121](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/121))

### August 29, 2023

`2.0.7`:

- Allow already structured logs in text format to use level-specific headers for logging protocol ([#111](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/111))

### August 22, 2023

`2.0.6`:

- Add structured logging implementation ([#101](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/101))

### August 16, 2023

`2.0.5`:

- Add support for Python3.11. ([#103](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/103))
- Add support for Python3.10. ([#102](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/102))
- Emit multi-line logs with timestamps.([#92](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/92))
- Remove importlib-metadata dependency.([#83](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/83))

### May 25, 2022

`2.0.4`:

- Update os distro and runtime versions in compatibility tests, source base images from Amazon ECR Public ([#80](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/80))
- Improve error output for missing handler ([#70](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/70))
- Update curl to 7.83.1 ([#79](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/79))

### May 4, 2022

`2.0.3`:

- Add changelog ([#75](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/75))
- Fix curl download url ([#74](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/74))
- Update curl to 7.83.0 ([#72](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/72))

### Apr 7, 2022

`2.0.2`:

- Add leading zeros to the milliseconds part of a log timestamp ([#13](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/13))
- Use the raw fd directly rather than opening the fd pseudo file ([#56](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/56))

### Jan 4, 2022

`2.0.1`:

- Add '--no-same-owner' option to all scripts tar commands ([#37](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/37))

### Sep 29, 2021

`2.0.0`:

- Add arm64 architecture support ([#59](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/59))
- Update Curl to 7.78.0 ([#52](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/52))

### Aug 23, 2021

`1.2.2`:

- Remove importlib.metadata dependency ([#55](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/55))

### Aug 20, 2021

`1.2.1`:

- Remove logging for handler directory, as its adding un-necessary cloudwatch cost ([#51](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/51))

### Jun 28, 2021

`1.2.0`:

- Move the `/` to `.` replacement only for import_module call ([#47](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/47))
- Add support for `/` in handler name ([#45](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/45))
- Add requestId in error response ([#40](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/40))

### Jun 9, 2021

`1.1.1`:

- Update Curl version to 7.77.0 ([#33](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/35))

### May 28, 2021

`1.1.0`:

- Release GIL when polling Runtime API for next invocation ([#33](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/33))
- Use importlib instead of deprecated imp module ([#28](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/28))
- Rename test directory ([#21](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/21))
- Revise fetching latest patch version of python ([#9](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/9))
- Update README.md examples: remove period from curl command ([#7](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/7))
- Add 'docker login' to fix pull rate limit issue ([#5](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/5))
- Include GitHub action on push and pr ([#3](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/3))
- Use Python 3.6 for Black ([#2](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/2))
- Tidy up setup.py ([#1](https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/1))

### Dec 01, 2020

`1.0.0`:

- Initial release of AWS Lambda Python Runtime Interface Client
6 changes: 3 additions & 3 deletions THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
@@ -228,15 +228,15 @@ SOFTWARE.

------

** libcurl; version 7.65.3 -- https://github.com/curl/curl
Copyright (c) 1996 - 2020, Daniel Stenberg, <daniel@haxx.se>, and many
** libcurl; version 7.83.1 -- https://github.com/curl/curl
Copyright (c) 1996 - 2022, Daniel Stenberg, daniel@haxx.se, and many
contributors, see the THANKS file.

All rights reserved.

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1996 - 2020, Daniel Stenberg, <daniel@haxx.se>, and many
Copyright (c) 1996 - 2022, Daniel Stenberg, daniel@haxx.se, and many
contributors, see the THANKS file.

All rights reserved.
5 changes: 5 additions & 0 deletions awslambdaric/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
"""

__version__ = "3.1.1"
8 changes: 6 additions & 2 deletions awslambdaric/__main__.py
Original file line number Diff line number Diff line change
@@ -10,10 +10,14 @@

def main(args):
app_root = os.getcwd()
handler = args[1]

try:
handler = args[1]
except IndexError:
raise ValueError("Handler not set")

lambda_runtime_api_addr = os.environ["AWS_LAMBDA_RUNTIME_API"]

print(f"Executing '{handler}' in function directory '{app_root}'")
bootstrap.run(app_root, handler, lambda_runtime_api_addr)


Loading