Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambdaのデプロイでエラーが発生する #6

Open
seiichisakamoto opened this issue Jul 16, 2024 · 0 comments
Open

Lambdaのデプロイでエラーが発生する #6

seiichisakamoto opened this issue Jul 16, 2024 · 0 comments

Comments

@seiichisakamoto
Copy link

ハンズオンの準備中にLambda関数のデプロイでエラーが発生したため、
README.mdの免責事項の記載に則りIssueを作成させていただきます。
https://github.com/uma-arai/o11y-story-code?tab=readme-ov-file#%E5%85%8D%E8%B2%AC%E4%BA%8B%E9%A0%85
(書籍拝読し、楽しく勉強させていただいております。素晴らしい書籍のご執筆ありがとうございます。)


現象

README.mdの記載に沿ってハンズオンに必要なリソースをデプロイしていたところ、
Lambda関数のデプロイで以下画像のエラーが発生しました。
https://github.com/uma-arai/o11y-story-code?tab=readme-ov-file#lambda%E3%81%AE%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4

スクリーンショット 2024-07-12 202537

再現方法

README.mdの手順に従い、Lambda関数をデプロイすると発生します。

原因

先日Go 1.xランタイムのサポートが切れたことが影響していると考えられます。
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/lambda-runtimes.html#runtimes-deprecated

対応方法(案)

ランタイムをアップデートし、実行ファイル名を所定の名前に変更すること。

AWS Compute Blog内の以下の項目を参考に/o11y-story-code/lambda-go/Makefile/o11y-story-code/lambda-go/template.yamlを修正したところ、デプロイとその後の動作確認が正常に完了しました。
https://aws.amazon.com/jp/blogs/compute/migrating-aws-lambda-functions-from-the-go1-x-runtime-to-the-custom-runtime-on-amazon-linux-2/

  • Compiling for the provided.al2 runtime
    • 実行ファイル名をbootstrapに修正
  • AWS Serverless Application Model
    • テンプレートファイルのBuildMethodプロパティ追加、HandlerプロパティとRuntimeプロパティ修正

お手すきの際にソースコードをご確認・修正していただけますと幸いです。
README.mdにはPull Requestの作成可否について記載がなかったため作成は控えさえていただきましたが、こちらでPull Requestを作成することも可能です。

お忙しいところ恐縮ですが、ご確認よろしくお願いいたします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant