Right Click your project and select Publish to AWS Lambda...
The Upload to AWS Lambda screen will appear. Make sure the correct region is selected. Keep all of the defaults. Then only enter the Function Name: AWSLambdaFunctionAgeInYears and then click next.
On the next page, select AWSLambdaRole for the Role Name field. Click Upload and the function should upload without error.