I've got a bit of javascript which runs on my local machine but doesn't work from within the Lambda.
It timeouts when calling cognitoidentity.getOpenIdTokenForDeveloperIdentity
{
  "errorMessage": "2016-03-17T16:50:25.181Z 4fa3fa5a-ec60-11e5-8316-415fa39313da Task timed out after 15.00 seconds"
}
On local it works fine (calling into AWS production services) so it must be the policy I have attached to the Lambda.
Here are the policies I have:
AmazonCognitoDeveloperAuthenticatedIdentities
AWSLambdaVPCAccessExecutionRole
And this is the custom one I also have:
 {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "mobileanalytics:PutEvents",
                "cognito-sync:*"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "lambda:InvokeFunction"
            ],
            "Resource": [
                "arn:aws:lambda:eu-west-1:myaccountid:function:users_login"
            ]
        }
    ]
}
The Lambda ARN was copied directly from that Lambda screen. Any ideas of what's missing?