Twitter bot made in 2018/10 has been refactored. The reason is
Because of the above, AWS's one-year free period is over, so I recreated the account while I was recreating it. The source code is here. The outline of the repository structure is as follows.
.
├── lambda (Lambda body)
│ ├── Modules to include
│ ├── lambdafunction.py
│ └── serverless.yml
│
└── selenium-layer (For Lambda Layer)
├── chrome-driver
├── selenium
└── serverless.yml
I was impressed that Serverless Framework was too easy.
serverless installed (node.js v4 or above required) AWS account acquired aws-cli installed and configured
First, upload the selenium + chromium that caused the source code bloat to Lambda Layer.
$ cd selenium-layer
$ sls deploy
After that, upload the Lambda main unit
$ cd ../lambda
$ sls deploy
That's all.
Recommended Posts