When I input any code in this function (e.g. console.log();
) and click "Save", an error occurs:
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 could run Functions successfully before today.
Does anyone know this error?