long2ice/fastapi-cache

Fail to build for AWS lambda in container in SAM CLI

onejgordon opened this issue · 0 comments

Python: 3.11
SAM CLI, version 1.103.0

Installed in requirements.txt with:
> pip install "fastapi-cache2[redis]"

Looks to be a problem with pendulum but trying previous versions (2.1.0 and 2.1.1) didn't solve the issue.

PythonPipBuilder:ResolveDependencies failed
Traceback (most recent call last):
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 64, in execute
    package_builder.build_dependencies(
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 159, in build_dependencies
    self._dependency_builder.build_site_packages(requirements_path, artifacts_dir_path, scratch_dir_path)
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 263, in build_site_packages
    raise MissingDependencyError(packages_without_wheels)
aws_lambda_builders.workflows.python_pip.packager.MissingDependencyError: {pendulum==2.1.1(sdist)}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflow.py", line 371, in run
    action.execute()
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 70, in execute
    raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: {pendulum==2.1.1(sdist)}
Builder workflow failed
Traceback (most recent call last):
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 64, in execute
    package_builder.build_dependencies(
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 159, in build_dependencies
    self._dependency_builder.build_site_packages(requirements_path, artifacts_dir_path, scratch_dir_path)
  File "/usr/local/opt/sam-cli/lib/python3.11/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 263, in build_site_packages
    raise MissingDependencyError(packages_without_wheels)
aws_lambda_builders.workflows.python_pip.packager.MissingDependencyError: {pendulum==2.1.1(sdist)}