Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Note |
---|
Please note that the following Lambda function explanation is offered only as an illustrative example. Users are solely responsible for the implementation and usage of the Lambda function based on the information and code we provide. Devo does not provide or maintain any piece of code required for this process. If you have any questions, please contact us. |
Download the source file
Download the file below, decompress it and copy the following folder and two files to the folder where you saved the Devo domain certificates previously downloaded:
...
Create a new AWS Lambda function in the same zone in which the S3 bucket resides.
Click Blueprints, then click the s3-get-object-python blueprint tile.
Click the Configure button. The next page contains three sections; Basic information, S3 trigger, and Lambda function code.
In the Basic information section, enter a Name for the new function.
If using an existing role, make sure that it has Lambda execution and S3 read permissions.
If not using an existing role, create a new one. Under Role, select Create new role from AWS Policy Templates. Enter a role name and select Amazon S3 object read-only permissions as the Policy Template.
In the S3 trigger section, select the Bucket that contains the events, set the Event type to All object create events, then select Enable trigger.
Click Create function. The next page contains several sections in which you configure the details of your new function.
Modify the Function code section as indicated below and for Function package, click Upload to select the .zip file you created earlier. Then, click Save to upload the file.
In the Execution role section, select the role you specified/created for the function. In the Basic settings section, set the Memory and Timeout to an interval close to, but less than, the event creation frequency. For example, if the log file creation frequency is 5 minutes, set the Timeout to 4 minutes and 30 seconds. In the Network section, select No VPC for the VPC value.
Click Save.
Now, select the new function to view its details. In the Execution role area, click View the <function-name> role to edit the role permissions.
On the Permissions tab, click Attach policy. Select AmazonS3ReadOnlyAccess, then click Attach policy.
...