HomeTutorsContact
AWS - Amazon Web Services
Introduction to Amazon S3 Object Lambda
Anton Putra
April 04, 2021
1 min

Prerequisites

  • AWS account (AWS Free Tier Sign Up)
  • AWS CLI (Installation guide)

Sections

Create AWS S3 bucket

  • Create devopsbyexample-object-lambda S3 bucket with unique name
  • Create and upload title.txt file to the S3 bucket with the following content

Create AWS Lambda Function

  • Create function folder
  • Create app.py file with lambda function
  • Inspect event object
  • Create requirements.txt file with function dependencies
  • Create Dockerfile to build and upload docker image to ECR repository
  • Build docker image
  • Create s3-transform ECR repository

  • Create S3TransformECRAccess IAM policy

  • Create Developers IAM group and attach S3TransformECRAccess policy

  • Create developer IAM user and place it in Developers IAM group

  • Create AWS default profile

  • Upload docker image to ECR
  • Create S3TransformLambdaPolicy IAM policy and attach it to S3TransformLambda IAM role
  • Create s3-transform lambda function from the docker image

Create Object Lambda Access Point

  • Create S3 transform Access Point

  • Create title-transform Object Lambda Access Points

Create Python Script to Access S3 and Lambda Access Point

  • Create main.py python script to access S3 object
  • Create virtualenv
  • Activate virtualenv
  • Install boto3 python package
  • Run the script
  • Create S3TransformS3Access IAM policy and attach it to Developers group
  • Run the script again

Clean Up

  • Delete /aws/lambda/s3-transform CloudWatch log group
  • Delete Developers IAM group
  • Delete developer IAM user and local credentials
  • Delete devopsbyexample-object-lambda S3 bucket
  • Delete s3-transform lambda

Tags

#aws#docker#lambda

Anton Putra

DevOps Engineer

Big Data | DevOps engineer with hands-on experience in building large, scalable batch and real-time applications with Apache Spark, Hive, Flink on top of Kubernetes; designing and developing CI/CD pipelines.

Expertise

Kubernetes
Terraform
AWS
GCP

Social Media

youtubefacebooklinkedinwebsite

Related Posts

AWS Session Manager
AWS Session Manager Tutorial
March 25, 2021
1 min
© 2021, All Rights Reserved.

Quick Links

About UsContact Us

Social Media