How To Read AWS S3 File Using Lambda Function (4 Min)

  Рет қаралды 538

Little Cloud Academy

Little Cloud Academy

2 ай бұрын

I'll show you how you can create a Lambda function that can read the content of any file stored in s3. Fully working Hands-om Demo
Lambda function code:
-------------------------------------------------------------
import json
import boto3
s3_client = boto3.client('s3')
def lambda_handler(event, context):
bucket_name = 'myawsbucket1098'
file_name = 'sample.txt'
s3_response = s3_client.get_object(Bucket=bucket_name, Key=file_name)
print("s3_response:", s3_response)
file_data = s3_response["Body"].read().decode('utf')
print("file_data:", file_data)

Пікірлер: 2
@TheCloudWanderer317
@TheCloudWanderer317 2 ай бұрын
That was exactly what I was looking for, high quality content. Thanks!
@LittleCloudAcademy
@LittleCloudAcademy 2 ай бұрын
Glad to hear it! Thanks a lot for supporting my proyect! T.
Lambda that sends emails? Hands-on in 3 mins
3:23
Little Cloud Academy
Рет қаралды 67
Create event-based projects using S3, Lambda and SQS
17:33
Knowledge Amplifier
Рет қаралды 10 М.
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 33 МЛН
ГДЕ ЖЕ ЭЛИ???🐾🐾🐾
00:35
Chapitosiki
Рет қаралды 6 МЛН
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 851 М.
New Gadgets! Bycycle 4.0 🚲 #shorts
00:14
BongBee Family
Рет қаралды 17 МЛН
AWS S3 File Upload + Lambda Trigger - Step by Step Tutorial
12:44
Be A Better Dev
Рет қаралды 97 М.
How to Create an AWS VPC with Public and Private Subnets
12:40
Be A Better Dev
Рет қаралды 103 М.
AWS SQS message trigger Lambda function 🚀
18:01
AWS cloud demos
Рет қаралды 1,6 М.
Developing AWS Lambda Functions Locally in VS Code
20:22
Travis Media
Рет қаралды 113 М.
Read JSON file from S3 With AWS Lambda in python with Amazon EventBridge Rule
11:14
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 33 МЛН