---
title: How to Implement Automic Processing of Real-Time Serverless Events
description: This tutorial walks through setting up Automic Automation to process real-time serverless events.  The example uses AWS Lambda functions.
image: https://academy.broadcom.com/hubfs/ESD-Academy-SkillBuilder_FeatureImage_How-to-Implement-Automic-Processing-of-Real-Time-Serverless-Events.jpg
---

[image/svg+xml 

](https://academy.broadcom.com/)

**

[AIOPS](https://academy.broadcom.com/aiops) [DEVOPS](https://academy.broadcom.com/devops) [VALUEOPS](https://academy.broadcom.com/valueops)

**

**

**

April 30, 2021

# How to Implement Automic Automation Processing of Real-Time Serverless Events

by: [Tobias Stanzel](https://academy.broadcom.com/meet-the-experts/tobias-stanzel)

## Before You Start

The content you will require is held in a Github repository, you can access it [here](https://github.com/tuct/automic-lambda).

It contains:

1. Implementation Guide (this document)
2. An Automic extract of the Automation Engine objects you will require
3. Source for the Lambda function itself

To create this in your own environment you will need:

###### AWS

- S3 bucket that you will use to upload files
- KMS to create an encryption key and assign the Lambda function role as a user
- Lambda to deploy and configure the Automic Rest Api function

###### Automic Automation

- Automic Automation v12.3 with REST interface accessible from the internet

###### Required Steps

- Prepare Automic to be able to receive the Event via rest
- Create/Choose an S3 Bucket
- Create Lambda Function based on template and set it up 
    - Make sure the password is encrypted
- It's Ready

Below, I detail the individual actions you need to take.

## Serverless App: Automic Automation REST API

To make it easy for you to use this integration, I published a small Function to AWS Lambda that can be easily configured to send any AWS Event in Lambda as a JSON payload to the Automic Automation REST API.

 

## Automic Automation Engine: Objects to process S3 event

Let’s start by creating the required objects to receive the S3 JSON event and write it to a static VARA object for further processing in the Automation Engine.

You can use the provided export(link!) which contains these objects:![Table of Automic objects](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure03.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure03.png)

The workflow JOBP.AWS_LAMBDA.S3 is very simple, it uses the Promptset PRPT.AWS_LAMBDA which only has one parameter &EVENT_JSON# to receive the JSON payload ![Automic workflow screenshot](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure04.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure04.png)

and one script SCRI.ADD_FILE_TO_PROCESS that will parse the JSON into AE variable ![Automic job source code](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure05.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure05.png) 

and writes the file to the static Vara VARA.S3.FILES_TO_PROCESS for further processing.

The test_payload.json file contains a JSON payload for an S3 put request to a bucket that can be used to test the workflow.

 

## AWS S3 bucket

Choose a region where you want to create your example, here I am using EU Frankfurt (eu-central-1), and make sure you create all required resources in this region.

First, we need to [create an S3 bucket](https://s3.console.aws.amazon.com/s3/bucket/create) which we will use for this demo.   
I called it “automic-aws-lambda-example” if you choose another name, make sure to also replace this in the Lambda function we will create  
![AWS S3 Screenshot](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure06.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure06.png)

 

## AWS Lambda Function and Encryption Key

Next, we will [create an AWS Lambda function](https://eu-central-1.console.aws.amazon.com/lambda/home#/create/function), choose “Browse serverless app repository” and search for “automic”

![AWS Lambda function screenshot](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure07.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure07.png) Select autiomic-rest-api and “Deploy” to create the function

In order to use the encryption for the password field, we need to create or use an encryption key in the [Key Management Service (KMS)](https://eu-central-1.console.aws.amazon.com/kms/home#/kms/keys/create)

![AWS Key Management Service](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure08.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure08.png)

Use “Symetric” and click “Next”

![AWS Key Management Service labels](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure09.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure09.png)![AWS Key Management Service - Define key administrative permissions](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure10.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure10.png)![AWS Key Management Service - Define key usage permissions](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure11.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure11.png)

Now we need to choose administrative and usage permissions.   
AWS created a dedicated account for our Lambda function, so we need to assign that here in step 3 and 4. The name of the role will start with “serverlessrepo-automic-rest-api-”

![AWS Key Management Service - Review and edit key policy](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure12.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure12.png)

Create the key by clicking “Finish”, you should see something like this ![AWS Key Management Service - Customer managed keys](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure13.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure13.png)

You can go back to your [AWS Lambda function](https://eu-central-1.console.aws.amazon.com/lambda/home#/functions/s3-to-automic/latest?tab=configure) now and navigate to “Latest Configuration -> Environment” and Edit the environment variables.

![AWS Lambda Functions - Edit environment variables](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure14.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure14.png)

Choose “Enable helpers for encryption in transit”, enter the password and only on the password field press “Encrypt” and select the key we just created![AWS Lambda Functions - Encryption in transit](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure15.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure15.png)

Now the password is encrypted and not in plain text anymore

![AWS Lambda Functions - Edit environment variables](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure16.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure16.png)

Save the Environment variables.   
Now we only need to configure the trigger for this function.   
Navigate to “Latest configuration -> Trigger” and click “Add trigger”

![AWS Lambda Functions - Add trigger](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure17.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure17.png)

Choose “S3”

![AWS Lambda Add trigger](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure18.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure18.png)

And now select the S3 bucket we created before, I did not further restrict the event definition but if you want you can do so according to your use case.

![AWS Lambda - Trigger configuration](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure19.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure19.png)

![AWS Lambda - Recursive invocation](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure20.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure20.png)

Good hint by AWS ;) Don’t write to the same S3 bucket or you will end up in the recursive hell and consume a lot of compute resources!

As soon as the trigger is active you will get a REST call to the Automic REST interface for every file that is uploaded to the S3 Bucket.

Uploaded file to S3

![AWS Lambda Functions - Object overview](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure21.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure21.png)

The workflow triggered in the Automic Automation Engine

![Automic Automation workflow that is triggered](https://academy.broadcom.com/hs-fs/hubfs/ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure22.png?width=936&name=ESD_CY21_Academy-Blog_How_to_work_with_AWS_Lambda-Figure22.png)

You can see the mapped properties from the S3 event in the workflow!

![broadcom wbg](https://academy.broadcom.com/hs-fs/hubfs/Broadcom%20Dev/images/broadcom%20wbg.png?length=300&name=broadcom%20wbg.png "broadcom wbg")

Sponsored by Broadcom.

<https://twitter.com/Broadcom> <https://www.linkedin.com/company/broadcom/> <https://www.youtube.com/user/BroadcomCorporation>

##### [AIOps](https://academy.broadcom.com/aiops)

##### [DevOps](https://academy.broadcom.com/devops)

##### [ValueOps](https://academy.broadcom.com/valueops)

© 2026 Broadcom [Broadcom.com](https://www.broadcom.com/) [Bizops.com](https://www.bizops.com/) [Communities](http://communities.broadcom.com/home) [Digital Hub](https://digitalhub.broadcom.com/)

[Privacy Policy](https://www.broadcom.com/company/legal/privacy-policy) [Cookies Policy](https://www.broadcom.com/company/legal/cookie-policy) [Data Processing and Data Transfers](https://www.broadcom.com/company/legal/ca/data-transfers) [Supplier Responsibility](https://www.broadcom.com/company/citizenship/governance-and-ethics#supply) [Terms of Use](https://www.broadcom.com/company/legal/terms-of-use/) [Sitemap](https://mainframe.broadcom.com/sitemap?hsLang=en)

Copyright © 2005-2022 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.