Skip to content

Commit

Permalink
Invoke kevsync lamdba to initially load KEV data into the database
Browse files Browse the repository at this point in the history
  • Loading branch information
dav3r committed Oct 16, 2024
1 parent 1f4026f commit 3b1e09c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ that can be used to create a Cyber Hygiene (CyHy) environment in AWS.

| Name | Type |
|------|------|
| [aws_lambda_invocation.kevsync](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_invocation) | resource |
| [aws_security_group_rule.egress_from_ec2_to_documentdb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.ingress_from_ec2_to_documentdb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_caller_identity.cyhy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
Expand Down
8 changes: 8 additions & 0 deletions cyhy-kevsync-lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ module "kevsync_lambda" {
vpc_subnet_ids = module.subnets.private_subnet_ids
}

# Invoke the Lamdba function to initially load KEV data into the database
resource "aws_lambda_invocation" "kevsync" {
provider = aws.provisionaccount

function_name = module.kevsync_lambda.lambda_function_name
input = "{}"
}

# Schedule the Lambda function
module "kevsync_eventbridge" {
providers = {
Expand Down

0 comments on commit 3b1e09c

Please sign in to comment.