Skip to main content Skip to complementary content

Upload the Lambda function to AWS

Procedure

  1. Right-click on the project, then click Amazon Web Services > Upload function to AWS Lambda.
  2. Select target Lambda function.
    1. Select AWS Region: Select EU West(Ireland).
    2. Choose Create a new Lambda function then type S3LambdaFunctionHandler.
  3. Function Configuration.
    • Function Execution - Handler: Select your Java Handler.
    • IAM Role: Select or create a new role if you do not have any. keep with default settings.
    • S3 bucket: Should be automatically populated. Create a new one if needed and keep with default settings.
    • All other fields: keep with default values.
  4. Click Finish to start uploading the code.

    Once the upload is complete, go to AWS Lambda console and check the Lambda dashboard. You should now see your Lambda function in the functions list as below:

What to do next

Now we need to create parameters for the Lambda function. These parameters will be used to configure Talend Administration Center url and the credentials for authentication.

This is a best practice to use parameters for all environment variables in order to avoid hard coded values.

  1. Go to AWS Lambda dashboard > Functions, and click on function S3LambdaFunctionHandler.
  2. In Code tab, add four environment variables as below:
    • tac_endpoint = http://<TAC_IP>:8080/tac, where <TAC_IP> is the IP address of the Talend Administration EC2 host.
    • tac_username = <TAC username> (Default user = admin@company.com).
    • tac_password = <TAC password> (Default password = admin).
    • tac_task_name = customers_csv_to_xml
  3. Click Save.

You have successfully created, uploaded and configured in AWS Lambda dashboard your Lambda Java function. This was the hard part of the demo.

Now we can configure S3 to invoke the Lambda function whenever a CSV file is uploaded in S3.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!