波田野 裕一
2021-02-18
Lambdaレイヤーについて作成・更新・削除を行う。
本手順は、以下の権限を有する「IAMユーザー」もしくは「IAMロールが付与された環境(Cloud9などを含むEC2環境)で行います。
作業権限条件: 必要なIAMポリシー
AWSLambdaFullAccess
IAMFullAccess
CloudWatchLogsFullAccess
必要なIAMポリシーを利用する環境(「IAMユーザー」「IAMグループ」もしくは「IAMロール」)にアタッチした後に、手順を実施します。
注釈
本手順は、Cloud9環境での実施を推奨します。
AWS CLIハンズオンの環境構築手順: http://prototype-handson-cli.s3-website-ap-northeast-1.amazonaws.com/handson_light_web-aws_prepare/handson_light_web-aws_prepare-cloud9/index.html
本手順は、以下の環境で行います。
環境条件1: OSとバージョン
本手順は、Amazon Linux 2"2018.03"以降のOS環境での実施を前提としています。
コマンド: cat /etc/system-release 結果(例): Amazon Linux release 2 (2018.03)
コマンド:
cat /etc/system-release
結果(例):
Amazon Linux release 2 (2018.03)
環境条件2: シェルとバージョン
本手順は、bash "4.2.46(2)-release"以降のシェル環境での実施を前提としています。
コマンド: bash --version -v \ | head -1 結果(例): GNU bash, バージョン 4.2.46(2)-release (x86_64-redhat-linux-gnu)
bash --version -v \ | head -1
GNU bash, バージョン 4.2.46(2)-release (x86_64-redhat-linux-gnu)
環境条件3: AWS CLIのバージョン
本手順は、AWS CLIのバージョン"1.18.81"以降での実施を前提としています。
コマンド: aws --version 結果(例): aws-cli/1.18.81 Python/3.6.10 Linux/4.14.173-106.229.amzn1.x86_64 botocore/1.16.0
aws --version
aws-cli/1.18.81 Python/3.6.10 Linux/4.14.173-106.229.amzn1.x86_64 botocore/1.16.0
本手順書で構築するAWSリソースの構成は以下の図のようになります。
CLIハンズオンの実施方法や効果的に行うためのポイントについては、CLIハンズオンガイドをご参照ください。
警告
Lambda関数の削除後もバージョン番号はリセットされません。(維持される期間は不明)
復習する場合は、関数名を変えるか、バージョン番号指定時に読み替えを行うようにしてください。
CloudShell環境で作業を実施します。
ハンズオン環境への権限追加
IAMロールの作成
logs用IAMポリシーの作成・アタッチ (カスタマー管理ポリシー)
今後の参考にするため、本手順についてご意見・コメントをお願いします。
必須項目はありません。お気軽にご回答ください。
内容が違えばお一人何回回答していただいても問題ありません。
はまりどころや誤字・脱字などの修正のご指摘もお待ちしています。
このアンケートシステムはS3 + Cognitoで構築しています。
logs用IAMポリシーのデタッチ・削除 (カスタマー管理ポリシー)
IAMロールの削除
ハンズオン環境からの権限剥奪
Cloud9環境の停止
(特になし)
https://aws.amazon.com/jp/lambda/
特徴: https://aws.amazon.com/jp/lambda/features/
料金: https://aws.amazon.com/jp/lambda/pricing/
よくある質問: https://aws.amazon.com/jp/lambda/faqs/
https://docs.aws.amazon.com/lambda/index.html
開発者ガイド: https://docs.aws.amazon.com/lambda/latest/dg/welcome.html
Lambda CLIリファレンス (v1): https://docs.aws.amazon.com/cli/latest/reference/lambda/index.html
Lambda CLIリファレンス (v2): https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lambda/index.html
Lambda APIリファレンス:
Actions: https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/API_Operations.html
https://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-service-cut/
AWS Lambda Part1 (2019/04/02)
SlideShare: https://www.slideshare.net/AmazonWebServicesJapan/20190402-aws-black-belt-online-seminar-lets-dive-deep-into-aws-lambda-part1-part2/
PDF: https://d1.awsstatic.com/webinars/jp/pdf/services/20190402_AWSBlackbelt_AWSLambda%20Part1%262.pdf
Youtube: https://youtu.be/QvPgjEwgiew
AWS Lambda Part2 (2019/04/09)
SlideShare: (part1と同じ)
PDF: (part1と同じ)
Youtube: https://youtu.be/96ku2x1NCaE
AWS Lambda Part3(2019/05/15)
Youtube: https://youtu.be/rMG18Fr896U
AWS Lambda Part4(2019/05/21)
Youtube: https://youtu.be/AOx5iNmxOC8
AWS Serverless Application Model (2019/08/14)
SlideShare: https://www.slideshare.net/AmazonWebServicesJapan/20190814-aws-black-belt-online-seminar-aws-serverless-application-model-165314501
PDF: https://d1.awsstatic.com/webinars/jp/pdf/services/20190814_AWS-Blackbelt_SAM_rev.pdf
Youtube: https://youtu.be/xQbLiqkI1Mw
Serverlessモニタリング (2019/08/20)
SlideShare: https://www.slideshare.net/AmazonWebServicesJapan/20190820-aws-black-belt-online-seminar-serverless
PDF: https://d1.awsstatic.com/webinars/jp/pdf/services/20190820_AWS-Blackbelt_Serverless_Monitoring.pdf
Youtube: https://youtu.be/uEYn3ssifoM
実践的 Serverless セキュリティプラクティス (2019/08/13)
SlideShare: https://www.slideshare.net/AmazonWebServicesJapan/20190813-aws-black-belt-online-seminar-serverless
PDF: https://d1.awsstatic.com/webinars/jp/pdf/services/20190813_AWS-BlackBelt_ServerlessSecurityPractice.pdf
Youtube: https://youtu.be/KfQUhK4mUZo
Run Code in The Cloud AWS Lambda 概要 (2015/08/11)
SlideShare: https://www.slideshare.net/AmazonWebServicesJapan/20150701-run-codeinthecloud
PDF: https://d1.awsstatic.com/webinars/jp/pdf/services/20150701_AWS-BlackBelt-runcodeinthecloud.pdf
AWS Lambda@Edge (2018/02/21)
SlideShare: https://www.slideshare.net/AmazonWebServicesJapan/20180221-aws-black-belt-online-seminar-aws-lambdaedge
PDF: https://d1.awsstatic.com/webinars/jp/pdf/services/20180221_AWS_Lambda_at_Edge_Black_belt.pdf