I followed Amazon's tutorials on creating a HelloWorld lambda function in the Sydney region. It worked on the AWS console.
Then I tried to do it on the command line:
aws lambda invoke --invocation-type RequestResponse --function-name HelloWorld --region Sydney --payload '{"key1":"value1", "key2":"value2", "key3":"value3"}' outputfile.txt
Error:
Could not connect to the endpoint URL: "https://lambda.Sydney.amazonaws.com/2015-03-31/functions/HelloWorld/invocations"
I think my security keys are working because the the following command for listing my S3 buckets worked:
aws s3api list-buckets # Worked, so the security keys should work
