Using this terraform module you can deploy a lambda function that will run a selenium in a lambda container.
-
Install Terraform
-
Install AWS CLI
-
Set AWS credential in your environment,
aws configure --profile your_profile_name -
Set AWS profile in your environment,
export AWS_PROFILE=your_profile_name
Modify terraform.tfvars.template to terraform.tfvars, and set the tfvars
resource_tags = {
terraform = "true"
project = "lambda-container-selenium"
version = "1.0"
}
-
Deploy resources:
terraform initterraform planterraform apply -
Destroy resources:
terraform destroy
| Name | Version |
|---|---|
| terraform | >= 1.0 |
| aws | >= 5.0 |
| docker | >= 3.0 |
| null | >= 3.0 |
| random | >= 3.0 |
| Name | Version |
|---|---|
| aws | 5.99.1 |
| random | 3.7.2 |
| Name | Source | Version |
|---|---|---|
| lambda_container | terraform-aws-modules/lambda/aws | 7.21.0 |
| lambda_docker_image | terraform-aws-modules/lambda/aws//modules/docker-build | 7.21.0 |
| Name | Type |
|---|---|
| aws_ecr_repository.lambda_repo | resource |
| random_string.random | resource |
| aws_caller_identity.this | data source |
| aws_ecr_authorization_token.token | data source |
| aws_region.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| aws_region | The resource deployment region | string |
"us-east-1" |
no |
| resource_tags | Tags to apply to resources | map(string) |
n/a | yes |
| Name | Description |
|---|---|
| ecr_repository_url | The URL of the ECR repository |
| lambda_docker_image_uri | The ECR Docker image URI used to deploy Lambda Function |
| lambda_function_arn | The ARN of the Lambda Function |
| lambda_function_name | The name of the Lambda Function |