Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Handler and job.json path in .py file #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ resource "aws_lambda_function" "this" {
filename = var.lambda_zip_path
function_name = "${var.project_base_name}-lambda"
role = aws_iam_role.lambda_job.arn
handler = "mediaconvert.convert_video"
handler = "mediaconvert_lambda/mediaconvert.convert_video"
source_code_hash = filebase64sha256(var.lambda_zip_path)
runtime = "python3.8"
timeout = 60
Expand Down
2 changes: 1 addition & 1 deletion mediaconvert_lambda/mediaconvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def convert_video(event, context):
client = boto3.client('mediaconvert', region_name=region, endpoint_url=mediaConvertEndpoint, verify=False)

# Job settings are in the lambda zip file in the current working directory
with open('job.json') as json_data:
with open('mediaconvert_lambda/job.json') as json_data:
jobSettings = json.load(json_data)

# Update the job settings with the source video from the S3 event and destination
Expand Down