letsencrypt-lambda

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README ΒΆ

letsencrypt-lambda

AWS lambda function for creating and updating letsencrypt certificates

Usage

You can use terraform (>= 0.13.5) to deploy the lambda function:

module "letsencrypt-lambda" {
  source = "github.com/lscheidler/letsencrypt-lambda?ref=main"

  email              = "me@example.com"
  domains            = "example.com,*.example.com"
  aws_hosted_zone_id = "Z123ABC456DEF7"
  issuer_passphrase  = "<secure_issuer_passphrase>"
  client_passphrase  = "<secure_client_passphrase>"

  on_failure = [data.aws_sns_topic.topic.arn]

  aws_iam_policy_additional_statements = [
    {
      effect = "Allow",
      actions = [
        "sns:Publish",
      ],
      resources = [
        data.aws_sns_topic.topic.arn,
      ]
    }
  ]
}

It is going to configure

  • iam role and policy for required permissions
  • lambda function
  • secrets (issuer_passphrase, client_passphrase) to secrets manager (optional)
  • cloudwatch event rule to run lambda daily

Argument Reference

Name Required Default Description
aws_hosted_zone_id πŸ—Ή Route53 Domain id
client_passphrase πŸ—Ή Client passphrase for certificate encryption
domains πŸ—Ή Domains to get a certificate for
email πŸ—Ή Registration email for letsencrypt
issuer_passphrase πŸ—Ή Issuer passphrase for letsencrypt account data
aws_region πŸ—· ""
aws_assume_role πŸ—· ""
aws_iam_policy_name πŸ—· "letsencrypt-lambda_policy"
aws_iam_policy_path πŸ—· "/"
aws_iam_policy_description πŸ—· "letsencrypt policy"
aws_iam_policy_additional_statements πŸ—· []
aws_iam_role_name πŸ—· "letsencrypt-lambda_role"
aws_lambda_function_function_name πŸ—· "letsencrypt-lambda"
aws_lambda_function_publish πŸ—· true
aws_lambda_alias_name πŸ—· "dev"
aws_lambda_alias_description πŸ—· "letsencrypt-lambda dev"
dynamodb_table_name πŸ—· "LetsencryptCA"
use_aws_secrets_manager πŸ—· true
use_cloudwatch_event πŸ—· true
aws_cloudwatch_event_target_target_id πŸ—· "" => aws_lambda_function_function_name
aws_cloudwatch_event_rule_name πŸ—· "" => aws_lambda_function_function_name
aws_cloudwatch_event_rule_description πŸ—· "" => aws_lambda_function_function_name
schedule_expression πŸ—· "cron(01 03 * * ? *)"

License

The lambda function is available as open source under the terms of the Apache 2.0 License.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL