この記事は、Perl Advent Calendar 2023 5日目の記事です。 4日目は@doikojiで「ChatGPTとperl:古のCGIスクリプトを現代的な環境に合わせて再生させようとした話」でした。
AWS LambdaにAmazon Linux 2023ベースのカスタムランタイムが追加されました。 これはつまり・・・
Perlを…ビルドせねば…https://t.co/akYtrs3qXM
— f96fd3a0-bdb9-4f10-b69f-8f765c1d341c ICHINOSEShogo (@shogo82148) November 10, 2023
ということでPerlをビルドしました。
使い方はPerl Hackers Hubをどうぞ。
- Perl Hackers Hub 第75回 AWS Lambda入門 サーバレスでもPerlを活用しよう!(1)
- Perl Hackers Hub 第75回 AWS Lambda入門 サーバレスでもPerlを活用しよう!(2)
ビルド済み公開 Perl Runtime Layer
いつも通りビルド済みのレイヤーを公開しています。
- x86_64 architecture
arn:aws:lambda:af-south-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-east-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-northeast-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-northeast-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-northeast-3:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-south-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-south-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-southeast-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-southeast-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-southeast-3:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ap-southeast-4:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:ca-central-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-central-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-central-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-north-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-south-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-south-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-west-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-west-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:eu-west-3:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:il-central-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:me-central-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:me-south-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:sa-east-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:us-east-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:us-west-1:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
arn:aws:lambda:us-west-2:445285296882:layer:perl-5-38-runtime-al2023-x86_64:2
- arm64 architecture
arn:aws:lambda:af-south-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-east-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-northeast-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-northeast-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-northeast-3:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-south-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-south-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-southeast-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-southeast-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-southeast-3:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ap-southeast-4:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:ca-central-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-central-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-central-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-north-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-south-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-south-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-west-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-west-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:eu-west-3:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:il-central-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:me-central-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:me-south-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:sa-east-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:us-east-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:us-west-1:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
arn:aws:lambda:us-west-2:445285296882:layer:perl-5-38-runtime-al2023-arm64:2
ビルド済み公開 Paws Layer
- x86_64 architecture
arn:aws:lambda:af-south-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-east-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-northeast-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-northeast-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-northeast-3:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-south-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-south-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-southeast-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-southeast-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-southeast-3:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ap-southeast-4:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:ca-central-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-central-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-central-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-north-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-south-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-south-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-west-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-west-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:eu-west-3:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:il-central-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:me-central-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:me-south-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:sa-east-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:us-east-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:us-west-1:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
arn:aws:lambda:us-west-2:445285296882:layer:perl-5-38-runtime-paws-x86_64:3
- arm64 architecture
arn:aws:lambda:af-south-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-east-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-northeast-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-northeast-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-northeast-3:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-south-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-south-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-southeast-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-southeast-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-southeast-3:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ap-southeast-4:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:ca-central-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-central-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-central-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-north-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-south-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-south-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-west-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-west-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:eu-west-3:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:il-central-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:me-central-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:me-south-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:sa-east-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:us-east-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:us-east-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:us-west-1:445285296882:layer:perl-5-38-runtime-paws-arm64:1
arn:aws:lambda:us-west-2:445285296882:layer:perl-5-38-runtime-paws-arm64:1
al2023の注意点
詳細は公式のアナウンスを確認してほしいのですが、al2023ランタイムを使うに当たっていくつか注意点があります。
まずはパッケージ管理が microdnf
で行われていること。
通常のAmazon Linux 2023 では、パッケージ管理は yum
から後継の dnf
に切り替わりました。
AWS Runtimeではさらに容量を削減するために dnf
の軽量版である microdnf
を利用しているそうです。
これによりPythonへの依存がなくなり、軽量になったとのこと。
その分 dnf
コマンドの機能がいくつか機能が削減されています。
あとはtzdataが未インストールなこと(同僚がGoのデプロイでハマっていた)。 日時を扱うようなプログラムを書く場合は注意してください。
明日6日目はid:papixで「MySQLのDATETIMEをとにかく素早くPerlのDateTimeオブジェクトにしたい」です。 お楽しみに!