Skip to content

Commit

Permalink
Release: 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Feb 11, 2022
1 parent 38079e7 commit 7eb4c31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.1.build_72173
1.3.2
4 changes: 1 addition & 3 deletions modules/aft-lambda-layer/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ resource "aws_lambda_function" "codebuild_invoker" {
}
}

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

Expand All @@ -28,7 +27,6 @@ data "aws_lambda_invocation" "invoke_codebuild_job" {
JSON
}

# TODO condition behavior on result of invocation
output "lambda_layer_build_status" {
value = jsondecode(data.aws_lambda_invocation.invoke_codebuild_job.result)["BuildStatus"]
value = jsondecode(data.aws_lambda_invocation.invoke_codebuild_job.result)["Status"]
}
9 changes: 7 additions & 2 deletions src/aft_lambda/aft_builder/codebuild_invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@
import inspect
import logging
import time
from typing import Any, Dict, Union
from typing import Any, Dict, TypedDict, Union

from boto3.session import Session

logger = logging.getLogger()
logger.setLevel(level=logging.INFO)


class LayerBuildStatus(TypedDict):
Status: int


# This function is directly responsible for building `aft_common` library
# Do not import `aft_common` into this handler!
def lambda_handler(
event: Dict[str, Any], context: Union[Dict[str, Any], None]
) -> Dict[str, Any]:
) -> LayerBuildStatus:
try:
session = Session()
client = session.client("codebuild")
Expand Down

0 comments on commit 7eb4c31

Please sign in to comment.