The lab publishes one sample RPM (AL2023 / dnf) and one sample deb (Ubuntu
24.04 / apt) under a shared repos/ prefix. After each Put, the rebuild
Lambda rebuilds indexes and signs repo metadata so consumers can trust the
tree the usual way (repo_gpgcheck / signed-by).
Publisher IAM is intentionally narrow: Put under …/Packages/* and …/pool/*
only. Index objects, signatures, and catalog.json are written by the rebuild
Lambda, not by the publisher role.
Those tools run inside the same rebuild Lambda container image. EventBridge
triggers the function on Packages/*.rpm and pool/*.deb Puts to the primary
(demo.sh publish waits for that rebuild). The Lambda writes indexes and
signatures next to the packages and refreshes catalog.json plus the public
key on the UI bucket (and repos/gpg/lab-signing.asc on the package bucket for
VPCE consumers).
Signing is repo metadata, not re-signing the sample EPEL/Ubuntu packages:
up-shared creates a lab GPG keypair. The private key lands in Secrets
Manager; the public key is published for consumers (UI bucket / repos/).
After indexes are built, the Lambda imports the private key into an ephemeral
GNUPGHOME under /tmp, signs, uploads, and discards the keyring.
Consumers install the public key, then use repo_gpgcheck=1 (dnf) and
signed-by= (apt).
That fits the existing function (2048 MB / 300s): signing is milliseconds next to
S3 sync and index rebuild. A separate signer Lambda is not needed for this lab.