1

I am new to AWS Lambda service. So I tried to create a simple lambda function from using the blue-print of 'hello-world'. I am getting a 403 error when I am trying to create the function. Can someone please help me out?

enter image description here

4
  • What permissions do you have? What does the network tab say? What request fails with what response exactly? Commented Sep 14, 2021 at 7:51
  • It seems you have permissions issue. Please check with your administrator about the roles needed to create Lambda. Commented Sep 14, 2021 at 7:52
  • @luk2302 I am myself the administrator. This is first time I am creating a lambda function and getting 403 and I am creating a new role for it. In network tab POST is giving 403. Commented Sep 14, 2021 at 8:17
  • As others said you don’t have permission to create the lambda. Grant yourself the poor private permissions Commented Sep 14, 2021 at 12:23

2 Answers 2

1

When working with Lambda functions, you need to create an IAM role that has the appropriate permissions. Assume that you want to create an AWS Lambda function that invokes several AWS Services, like Amazon DynamoDB. You need to create an IAM role that has permissions to invoke a service that the Lambda function will invoke.

Because you are new to working with Lambda functions, you can refer to the following AWS tutorials. If you follow these, you will successfully deploy a Lambda function.

The 1st link shows you how to create a Lambda function that is able to detect personal protective equipment (PPE) in images located in an Amazon Simple Storage Service (Amazon S3) bucket. This example demonstrates how to create a Lambda function using the Java run-time API that invokes these services:

  • Amazon S3 service
  • Amazon Rekognition service
  • Amazon DynamoDB service
  • Amazon Simple Email service

Creating an AWS Lambda function that detects images with Personal Protective Equipment

It shows you how to successfully develop and deploy the Lambda function Likewise, here is a tutorial that shows you how to create a Lambda function using the AWS SDK for JavaScript.

Creating and using Lambda functions

Sign up to request clarification or add additional context in comments.

2 Comments

While true this does not really answer / solve the question since the problem is not with the lambda role but with creating the lambda.
These two links are also show how to create Lambda functions by using either Java or JavaScript.
0

Today, I encountered the same error "Request failed with status code 403" that only occurred with the Python runtime (Python3.8, Python3.9), not with any other runtime. Interestingly, there were no relevant log entries in CloudTrail. However, I was able to create a Lambda function with a Python runtime successfully using the AWS CLI. Keen to know if it is a bug on AWS console or some other reasons.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.