Skip to content

🤖 An AWS a Day - AWS Certificate Preparation Series with AWS Lambda Functions, linebot.v3

License

Notifications You must be signed in to change notification settings

1chooo/an-aws-a-day

Repository files navigation

An AWS a Day - AWS Certificate Preparation Series

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 Lambda Function Layer

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

or With shell script

$ ./scripts/build_layer.sh

or just click the link below to download the line-bot-sdk layer

👉🏻 Download line-bot-sdk

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>/*"
            ]
        }
    ]
}

CONTACT INFO.

AWS Educate Cloud Ambassador, Technical Support
Hugo ChunHo Lin

📩 E-mail: hugo970217@gmail.com
🧳 Linkedin: Hugo ChunHo Lin
👨🏻‍💻 GitHub: 1chooo

License

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.

Footnotes

  1. How do I resolve the "Unable to import module" error that I receive when I run Lambda code in Python? 2

  2. Policies and Permissions in Amazon S3

About

🤖 An AWS a Day - AWS Certificate Preparation Series with AWS Lambda Functions, linebot.v3

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published