From the course: AWS Essential Training for Developers
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Solution: Lambda function - Amazon Web Services (AWS) Tutorial
From the course: AWS Essential Training for Developers
Solution: Lambda function
(bright rhythmic music) (bright rhythmic music ending) - [Instructor] The first thing I did was start a new line and try to write another print statement, similar to the one that was already writing the ContentType. The AI tools started to give me a few suggestions, but I didn't find that these worked for me. The next thing I did was an internet search for python s3.get_object, and it did lead me to the documentation for this Python library. I can see in the example output that in addition to ContentType, I can also call ContentLength, and this looks to be the size of the uploaded file. On my new line, I put print, and then in parentheses with double quotes, I put SIZE:, with a space. And then I did a plus sign to concatenate a string, and then I said response, and then open brackets, and it started to suggest for me ContentLength. Then I click to Deploy to save the changes to my function. You could also attempt this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Hosting web apps with Elastic Beanstalk1m 32s
-
(Locked)
Running containers on AWS5m 20s
-
(Locked)
Using Kubernetes with AWS2m 26s
-
(Locked)
Serverless functions with Lambda1m 42s
-
(Locked)
Create a Lambda function3m 40s
-
(Locked)
Challenge: Lambda function49s
-
(Locked)
Solution: Lambda function3m 14s
-
(Locked)
-
-
-
-
-
-