I new a Lambda function, there is no question. But when I input any code in this function[eg. console.log();] and click "Save", ERROR occurred: "The provided execution role does not have permissions to call DescribeNetworkInterfaces on EC2"
exports.handler = (event, context, callback) => { callback(null, 'Hello from Lambda'); console.log(); // here is my code };
I bound the function with Role: lambda_excute_execution(Policy: AmazonElasticTranscoderFullAccess) And this function is not bound with any triggers now.
And then, I give the role "AdministratorAccess" Policy, I can save my source code correctly.
This role can run Functions successfully before today.
Does anyone know about this error?