Learn dynamsoft barcode reader in AWS lambda with python through aws cli and serverless framework cli.
- python: 3.9
- lambda function: x86_64
- create IAM user in your AWS account
- aws-cli
- newer version of serverless framework cli is prefered
dbr: 9.6.20
configure aws credentials
aws configure
modify aws region and your profile(aws credential) in serverless.yml
#change aws region here
region: ap-east-1
# change your credential profile here
# if you are using aws cli the first time, the profile should be 'default'.
# (on mac) find all your profiles in ~/.aws/credentials
profile: ServerlessFrameworkUser
deploy to aws lambda
sls deploy
You can see the function is created on lambda in your aws region.
add dbr dependency layer
go to lambda in your aws region -> AWS Lambda -> Layers -> Create layer
configure the layer and upload /layers/dbr@9.6.20/python.zip
After the layer is created, please go to dbr-tester-dev-hello function. Then add DBR layer as a Custom layer.
test the lambda function:
sls invoke -f hello
expected tesult:
[
"dynamsoft is awesome"
]
add dbr dependency layer: go to lambda in your aws region -> AWS Lambda -> Layers -> Create layer
configure the layer and upload the python.zip file from /layers/dbr@9.6.20/python.zip
create lambda function copy the code from /handler.py into your function
run test expected test result:
[
"dynamsoft is awesome"
]

