Develop a Line bot using AWS Lambda Functions and linebot.v3
library, utilizing Python 3.12
runtime.
Important
Note that Python 3.12
operates on an Amazon Linux 2023 Amazon Machine Image (AMI). Hence, ensure the creation of the layer on an Amazon Linux 2023 OS. 1
Create line-bot-sdk
Layer 1
$ mkdir -p lambda-layer/python
$ cd lambda-layer/python
$ pip3 install --platform manylinux2014_x86_64 --target . --python-version 3.12 --only-binary=:all: line-bot-sdk
$ ./scripts/build_layer.sh
Add Permission with s3 2
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": [
"arn:aws:s3:::<your-bucket-name>",
"arn:aws:s3:::<your-bucket-name>/*"
]
}
]
}
AWS Educate Cloud Ambassador, Technical Support
📩 E-mail: hugo970217@gmail.com
Hugo ChunHo Lin
🧳 Linkedin: Hugo ChunHo Lin
👨🏻💻 GitHub: 1chooo
Released under MIT by Hugo ChunHo Lin.
This software can be modified and reused without restriction. The original license must be included with any copies of this software. If a significant portion of the source code is used, please provide a link back to this repository.