{"id":23521569,"url":"https://github.com/tubone24/lambda_container_support_with_selenium","last_synced_at":"2026-05-02T06:31:15.489Z","repository":{"id":46217614,"uuid":"324180806","full_name":"tubone24/lambda_container_support_with_selenium","owner":"tubone24","description":"This is Creating a template that runs Selenium from Alpine container and deploying Lambda - Container Image Support and applying it with Terraform","archived":false,"fork":false,"pushed_at":"2023-12-15T14:56:27.000Z","size":10367,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-25T17:12:37.642Z","etag":null,"topics":["containers","lambda","selenium-python","terraform"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tubone24.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-24T15:04:36.000Z","updated_at":"2020-12-27T11:25:07.000Z","dependencies_parsed_at":"2023-12-15T15:51:14.016Z","dependency_job_id":"6ad4ecc0-d89c-47e4-a13d-634c0846e6a4","html_url":"https://github.com/tubone24/lambda_container_support_with_selenium","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Flambda_container_support_with_selenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Flambda_container_support_with_selenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Flambda_container_support_with_selenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tubone24%2Flambda_container_support_with_selenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tubone24","download_url":"https://codeload.github.com/tubone24/lambda_container_support_with_selenium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239212553,"owners_count":19600830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","lambda","selenium-python","terraform"],"created_at":"2024-12-25T17:12:41.416Z","updated_at":"2026-05-02T06:31:15.456Z","avatar_url":"https://github.com/tubone24.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambda_container_support_with_selenium\n\n[![license](https://img.shields.io/github/license/tubone24/lambda_container_support_with_selenium.svg)](LICENSE)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\n\u003e Lambda Container Support, use selenium, use terraform\n\nThis is Creating a template that runs Selenium from Alpine container and deploying **Lambda - Container Image Support** and applying it with Terraform\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [License](#license)\n\n## Background\n\nIn our company, we have a lot of Slack workSpaces.\n\nIn addition, we also post an attendance to Slack, but it's a bit of a hassle to post everything to all the different workSpaces.\n\nThen, it seems that we can solve this problem by using Slack API and mutual posting, but I heard that some WorkSpace prohibits external linkage for security reasons. What the heck...\n\nSo, if we take a screenshot of the secure Slack and post it to the Slack we usually use, at least we've communicated, so it'll be easy! So let's make it.\n\n![img](https://i.imgur.com/odKSxHU.png)\n\nMore information? Go to my Article: [Lambda – Container Image Supportを使ってAlpineからSeleniumが動くコンテナを作ってTerraformで当てる\n](https://blog.tubone-project24.xyz/2020/12/25/selenium-lambda-container)\n\n### Architects\n\nUse Lambda in VPC to create a Lambda with a fixed global IP address, and push the Docker Image to the ECR.\n\nAlso, for security reasons, the login password to Slack will be encrypted using AWS KMS.\n\n![img](https://i.imgur.com/GPamgYL.png)\n\n## Install\n\n### System Requirements\n\n- Terraform v0.12 or more\n- Make\n- Docker\n- Python 3.7\n\n### Preconditions\n\nThis tool used by Terraform, Make, Python and Docker.\n\nSo, Install those apps before run this tool.\n\n#### Quick Install\n\nWith my [mac-auto-setup](https://github.com/tubone24/mac-auto-setup), you can build the environment you need for your Mac.\n\n#### Set up your environment\n\nWhen executing the container, you need to specify the following environment variable.\n\nWrite your environments to your tfvars.\n\n|                          |                                                                      |                                                     | \n| ------------------------ | -------------------------------------------------------------------- | --------------------------------------------------- | \n| Name                     | Meaning                                                              | Ex                                                  | \n| SLACK_TOKEN              | Need to uploading the screenshot using Slack API                     | xnob-xxxxxx                                         | \n| SLACK_CHANNEL_ID         | Channel id where you want to upload the screenshot(not channel name) | C01SJAKESAD                                         | \n| SLACK_USERNAME           | Slack account login email                                            | example@hoge.com                                    | \n| SLACK_PASSWORD           | Slack account login password                                         | KMS encoded password                                | \n| SLACK_LOGIN_URL          | Slack login URL                                                      | https://hoge-hoge.slack.com                         | \n| SLACK_ATTEND_CHANNEL_URL | Screenshot point url                                                 | https://app.slack.com/client/XXXXXXXXXX/XXXXXXXXXXX | \n\nIn addition, set the security group id and subnet id to configure Lambda in VPC.\n\n```\n$ cp terraform/tfvars.tfvars.tpl env.tfvars\n$ vi terraform/env.tfvars\n\n$ cp terraform/ecr/tfvars.tfvars.tpl env.tfvars\n$ vi terraform/ecr/env.tfvars\n```\n\nSLACK_PASSWORD must be encrypted using AWS KMS, so you need to use kms_encrypt.py scripts.\n\n```\npip install -r requirements.txt\npython scripts/kms_encrypt.py keyId password\n```\n\n### Build Container Image\n\nThe following commands should be executed in the project root.\n\n```\nmake build-push-image ENV=env\n```\n\nOr built image from GitHub packages\n\n```\ndocker pull docker.pkg.github.com/tubone24/lambda_container_support_with_selenium/selenium:latest\ndocker tag docker.pkg.github.com/tubone24/lambda_container_support_with_selenium/selenium:latest your-ecr-repo-uri\ndocker push your-ecr-repo-uri\n```\n\n### Deploy\n\nThe following commands should be executed in the project root.\n\nFirst, Create ECR Repository\n\n```\nmake backend ENV=env\n\nmake remote-enable-ecr ENV=env\n\nmake create-env-ecr ENV=env\n\nmake plan-ecr ENV=env\n\nmake apply-ecr ENV=env\n```\n\nSecond, Deploy Lambda\n\n```\nmake remote-enable ENV=env\n\nmake create-env ENV=env\n\nmake plan ENV=env\n\nmake apply ENV=env\n```\n\n## Usage\n\nPost a screenshot of the Slack attend channel to Slack at a set time each day.\n\n![img](https://i.imgur.com/oHtRLCO.png)\n\n\n## License\n\n[MIT © tubone24](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftubone24%2Flambda_container_support_with_selenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftubone24%2Flambda_container_support_with_selenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftubone24%2Flambda_container_support_with_selenium/lists"}