Composite Image using Ruby2.5 and AWS Lambda
Then, Put AWS S3
Create AWS Account.
Then, You have to write AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to .envrc
- Install modules
$ bundle install --path vendor/bundle
- Write .envrc
$ bundle exec ruby lambda_function.rb
You have to write AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to ~/.aws/config
$ aws configure
AWS Access Key ID: XXX
AWS Secret Access Key: xxxx
Default region name: ap-northeast-1
Default output format:
$ zip -r function.zip lambda_function.rb image_helper.rb assets vendor
$ aws lambda update-function-code --function-name CompositeImageRuby25 --zip-file fileb://function.zip
or, use deploy.sh
$ sh deploy.sh
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/ruby-package.html