Using gnupg2-full in Lambda docker base image public.ecr.aws/lambda/python:3.12

0

The docker base image public.ecr.aws/lambda/python:3.12 is the first Python base image for AWS Lambda which comes with Amazon Linux 2023. Unlike Amazon Linux 2, this OS only ships only with a minimal version of gnupg2. AWS recommends to use dnf swap for replacing gnupg2-minimal with gnupg2-full.

However, this docker base image does not even ship with a full fledged dnf package manager but with microdnf, which has no support for swap.

I am looking for a way to get a full version of gnupg2 back into my Python3.12 Lamba function. The Lambda function that we have developed uses python-gnupg extensively and stopped working when we went from public.ecr.aws/lambda/python:3.10 to public.ecr.aws/lambda/python:3.12.

What are my options?

  • use a different base image that contains Python3.12 and is Lambda compatible - recommendations?
  • find a way to replace gnupg2-minimal with gnupg2-full when public.ecr.aws/lambda/python:3.12 is the base in a Dockerfile?
  • anything else?

Suggestions anyone?

reikje
asked 2 months ago94 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions