Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda function not saving on VPC selection

I cant save my Lambda (Node.js)function on AWS with VPC selection, its not saving at all and did not get any message from AWS.
When I try to save without VPC selection its working but then I select VPC its not saving at all.

enter image description here Its always showing same status save.

When I click on this, its not saving after refresh its again back to the previous form.

like image 967
satej sarker Avatar asked Apr 19 '19 10:04

satej sarker


People also ask

How do I make Lambda available in multiple VPCs?

This is not possible with Lambda. Lambda functions can provide access only to one single VPC. If there are multiple subnets and are specified, then they must all be in the same VPC. You then can connect to the other VPCs by peering your VPCs.

Do Lambda functions run in a VPC?

Lambda functions always run inside VPCs owned by the Lambda service. As with customer-owned VPCs, this allows the service to apply network access and security rules to everything within the VPC.

How do you save a Lambda function in AWS?

To save a file, with the file open and its contents visible in the editor pane, choose File, Save on the menu bar. To rename a file or folder, right-click the file or folder in the Environment window.


1 Answers

This happens most of the time when the role you have configured for lambda does not have access to the VPC. There is an error appearing at the top of the screen under the Designer tab, but it is difficult to catch and not always visible.

enter image description here

To resolve this, modify the role you have configured in lambda to include the policy named "AWSLambdaVPCAccessExecutionRole". Then you will be able to save this function.

https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html

like image 180
Joseph Avatar answered Oct 14 '22 22:10

Joseph