Skip to content

Commit 9b6a141

Browse files
author
Mark Beacom
authored
Update servicenow lambda refs to conform to generic status update (#87)
1 parent 490ff9c commit 9b6a141

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

step/cloudwatch.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ resource "aws_cloudwatch_event_target" "rehost_migration_target" {
3131

3232
resource "aws_lambda_event_source_mapping" "event_source_mapping" {
3333
event_source_arn = "${aws_sqs_queue.event_queue.arn}"
34-
function_name = "${aws_lambda_function.lambda_update_servicenow.arn}"
34+
function_name = "${aws_lambda_function.lambda_update_status.arn}"
3535
batch_size = 1
3636
}

step/lambdas.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ resource "aws_lambda_function" "lambda_image_cleanup" {
149149
}
150150
}
151151

152-
resource "aws_lambda_function" "lambda_update_servicenow" {
152+
resource "aws_lambda_function" "lambda_update_status" {
153153
filename = "lambdas.zip"
154-
function_name = "ce-update-servicenow"
154+
function_name = "ce-update-status"
155155
role = "${aws_iam_role.iam_for_lambda.arn}"
156-
handler = "update_servicenow.lambda_handler"
156+
handler = "update_status.lambda_handler"
157157
source_code_hash = "${data.archive_file.lambdas.output_base64sha256}"
158158
runtime = "python3.7"
159159
depends_on = ["data.archive_file.lambdas"]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
import boto3
1010

11-
# from typing import Any, Dict, List
11+
from typing import Any, Dict
1212

1313

14-
print("Loading function update_servicenow")
14+
print("Loading function update_status")
1515

1616

1717
def lambda_handler(event: Dict[str, Any], context: Any) -> bool:
1818
"""Handle signaling and entry into the AWS Lambda."""
19-
print("Received event: " + json.dumps(event, indent=2))
19+
print("Received event: ", json.dumps(event, indent=2))
2020

2121
for record in event["Records"]:
2222
payload = record["body"]

0 commit comments

Comments
 (0)