Create Lambda with Container Based Runtime

   Go back to the Task List

  « 4: Create Container Image    6: Clean up »

5: Create and Run Lambda Function

The container image is ready. You now configure a Lambda Function which uses container as the runtime environment.

  1. Goto the AWS Lambda console and click on the Create function button.

    Cloud9

  2. On the next screen, select Container image option. Type dojofunction for the function name. Use Browse images button to select the image you uploaded to ECR in the previous step. Select Create a new role with basic Lambda permissions option for the execution role. Keep rest of the configuration to the default and click on the Create function button.

    Cloud9

  3. The function is created in no time. You can now test the function. Click on the Test button.

    Cloud9

  4. On the next popup, type in dojotest for the event name and click on the Create button.

    Cloud9

  5. Back on the function details page, select dojotest and click on the Test button.

    Cloud9

  6. The Lambda Function runs successfully. You can see the execution result where the Lambda Function handler returns the message.

    Cloud9

  7. You saw how you can configure a Lambda Function which uses container as the runtime. This finishes the workshop. Goto the next step to clean up the resources so that you don’t incur any cost post the workshop.