0
votes

I am trying to create a Lambda function in AWS. I have used the document located at this URL http://docs.aws.amazon.com/lambda/latest/dg/lambda-dg.pdf

So far I have done -

  • pg 189 Set Up an AWS account and the AWS CLI and completed all necessary steps
  • pg 204 – 214 Using AWS Lambda with Amazon S3 and completed all necessary steps and tasks
  • pg 214 – Python – 216 Create EC2 instance with ubuntu and installed all dependencies like python-3.6, pip3, Pillow, boto3 and zipped all contents with CreateThumbnail.py
  • pg 216-219 – Creating Lambda Function using AWS CLI.

All the above commands I have completed in EC2 instance and my local PC (as I use ubuntu 16.04 on my PC)

Running the command

aws lambda create-function --region eu-west-2 --function-name CreateThumbnail2 
                           --code S3Bucket=bernylifecyclebucket2,S3Key=CreateThumbnail.zip 
                           --role arn:aws:iam::139511768183:role/LambdaFullAccess 
                           --handler CreateThumbnail2.handler --runtime python3.6 
                           --profile administrator --timeout 200 --memory-size 1024

from command line I can create the function in AWS. However, when I go into AWS to Lambda Functions and try to run the function I get this error in AWS

The deployment package of your Lambda function "CreateThumbnail2" is too large to enable inline code editing. However, you can still invoke your function right now.

If I try to upload the zip file from S3 it does not work, or if I try to upload it from my local PC it does not work.

Has anyone out there had success with this tutorial and if so what could I be doing wrong. Please help. Thanks in advance.

1
You will not be able to edit it inline when you upload your deployment package as zip. Did you try running your code in lambda? What error are you getting when you run it?anupsabraham
You are a star, thank you very much for your comment. It has helped tremendously !! :-)Berny Murville

1 Answers

4
votes

That's not an error message. It's just telling you that you can't edit the code inline in the browser console. The browser console code editor is only for very simple, small functions without any dependencies. It sounds like you have successfully deployed your function to AWS Lambda. It should be ready for you to invoke the function now.