Skip to content

Commit 7eb4c31

Browse files
author
AWS
committed
Release: 1.3.2
1 parent 38079e7 commit 7eb4c31

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.1.build_72173
1+
1.3.2

modules/aft-lambda-layer/lambda.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ resource "aws_lambda_function" "codebuild_invoker" {
1717
}
1818
}
1919

20-
# TODO - What happens when the function fails?
2120
data "aws_lambda_invocation" "invoke_codebuild_job" {
2221
function_name = aws_lambda_function.codebuild_invoker.function_name
2322

@@ -28,7 +27,6 @@ data "aws_lambda_invocation" "invoke_codebuild_job" {
2827
JSON
2928
}
3029

31-
# TODO condition behavior on result of invocation
3230
output "lambda_layer_build_status" {
33-
value = jsondecode(data.aws_lambda_invocation.invoke_codebuild_job.result)["BuildStatus"]
31+
value = jsondecode(data.aws_lambda_invocation.invoke_codebuild_job.result)["Status"]
3432
}

src/aft_lambda/aft_builder/codebuild_invoker.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,23 @@
55
import inspect
66
import logging
77
import time
8-
from typing import Any, Dict, Union
8+
from typing import Any, Dict, TypedDict, Union
99

1010
from boto3.session import Session
1111

1212
logger = logging.getLogger()
1313
logger.setLevel(level=logging.INFO)
1414

15+
16+
class LayerBuildStatus(TypedDict):
17+
Status: int
18+
19+
1520
# This function is directly responsible for building `aft_common` library
1621
# Do not import `aft_common` into this handler!
1722
def lambda_handler(
1823
event: Dict[str, Any], context: Union[Dict[str, Any], None]
19-
) -> Dict[str, Any]:
24+
) -> LayerBuildStatus:
2025
try:
2126
session = Session()
2227
client = session.client("codebuild")

0 commit comments

Comments
 (0)