samtools view -bS file.sam -o file.bam
would give some binary output and "random alignment retrieval only works for indexed BAM files".
Instead group arguments such that options are separated from filenames:
samtools view -bS -o Aligned.out Aligned.out.sam
Or use > to direct output to bam file
samtools view -bS Aligned.out.sam > Aligned.out.bam