Apparently AWS switched their Python base images for AWS Lambda to Amazon Linux 2023. I have a Lambda function which uses gnupg
and was working fine on older base images.
With the Python3.12 upgrade, I am hitting some issues. Apparently Amazon Linux 2023 just comes with gnupg2-minimal
and the recommendation is to install gnupg2-full
instead using this.
However, when I pull the docker images to my local machine and then run the container and SSH into it, the command dnf swap gnupg2-minimal gnupg2-full
just gives me this:
bash-5.2# dnf swap gnupg2-minimal gnupg2-full
This is microdnf, which implements subset of `dnf'.
Usage:
dnf [OPTION?] COMMAND
Commands:
upgrade Upgrade packages
update Compatibility alias for the "upgrade" command
module reset Reset a module stream
distro-sync Upgrade/downgrade packages to match versions in repositories
dsync Compatibility alias for the "distro-sync" command
remove Remove packages
reinstall Reinstall packages
clean Remove cached data
repolist List repositories
module enable Enable a module stream
download Download packages
makecache Generate the metadata cache
module disable Disable a module stream
repoquery Search for packages matching keyword
install Install packages
So I cannot even use swap
with microdnf? What are my options here? Would really like to get a full version of gnupg2 installed ...
After spending some time investigating, I decided to use an alternative base image with the runtime interface client.
This is the
Dockerfile
that I am using with AWS Lambda.