title: The environment variable AWS_ACCESS_KEY_ID must be set
body: <p>I am using Linux 18.04 and I want to lunch a spark cluster on EC2.</p>
  
  <p>I used the export command to set environment variables</p>
  
  <pre><code>export AWS_ACCESS_KEY_ID=MyAccesskey
  export AWS_SECRET_ACCESS_KEY=Mysecretkey
  </code></pre>
  
  <p>but when I run the command to lunch the spark cluster I get</p>
  
  <blockquote>
    <p>ERROR: The environment variable AWS_ACCESS_KEY_ID must be set</p>
  </blockquote>
  
  <p>I put all the commands I used in case I made a mistake:</p>
  
  <pre><code>
  sudo mv ~/Downloads/keypair.pem   /usr/local/spark/keypair.pem
  sudo mv ~/Downloads/credentials.csv   /usr/local/spark/credentials.csv
  # Make sure the .pem file is readable by the current user.
  chmod 400 "keypair.pem"
  # Go into the spark directory and set the environment variables with the credentials information
  cd spark
  export AWS_ACCESS_KEY_ID=ACCESS_KEY_ID
  export AWS_SECRET_ACCESS_KEY=SECRET_KEY
  # To install Spark 2.0 on the cluster:
  sudo spark-ec2/spark-ec2 -k keypair --identity-file=keypair.pem --region=us-west-2 --zone=us-west-2a --copy-aws-credentials --instance-type t2.micro --worker-instances 1 launch project-launch
  </code></pre>
  
  <p>I am new to these things and any help is really appreciated</p>