-
-
Save KyMidd/29dc78bf75e56b74ad2e0a1651dcf227 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "aws_lambda_function" "devopsbot_slack" { | |
| filename = "${path.module}/devopsbot.zip" | |
| function_name = "DevOpsBot" | |
| role = aws_iam_role.DevOpsBotIamRole.arn | |
| handler = "devopsbot.lambda_handler" | |
| timeout = 30 | |
| memory_size = 512 | |
| runtime = "python3.12" | |
| architectures = ["arm64"] | |
| publish = true | |
| # Layers are packaged code for lambda | |
| layers = [ | |
| # This layer permits us to ingest secrets from Secrets Manager | |
| "arn:aws:lambda:us-east-1:${data.aws_caller_identity.current.id}:layer:AWS-Parameters-and-Secrets-Lambda-Extension-Arm64:12", | |
| # Slack bolt layer to support slack app | |
| aws_lambda_layer_version.slack_bolt.arn, | |
| ] | |
| source_code_hash = data.archive_file.devopsbot_slack_trigger_lambda.output_base64sha256 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment