title: Can't create IAM role with bash on ubuntu
body: <p>Im trying to create an IAM role with bash in ubuntu following this tutorial to create a lambdaless data api with aws. However im struggling to create the IAM role through the bash script.</p>
  
  <p><a href="https://hackernoon.com/serverless-and-lambdaless-scalable-crud-data-api-with-aws-api-gateway-and-dynamodb-626161008bb2" rel="nofollow noreferrer">https://hackernoon.com/serverless-and-lambdaless-scalable-crud-data-api-with-aws-api-gateway-and-dynamodb-626161008bb2</a></p>
  
  <pre><code>#!/bin/sh
  . ./common-variables.sh
  
  #Setup API Gateway Role
  role_name=api-gateway-dynamo-full-user-comments
  aws iam create-role --role-name ${role_name} \
      --assume-role-policy-document file://../../IAM/assume-role-api-gateway.json --profile $profile
  #Add Policy for API Gateway to write to logs
  role_policy_arn="arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"
  aws iam attach-role-policy \
      --role-name "${role_name}" \
      --policy-arn "${role_policy_arn}"  --profile ${profile}
  
  #Create DynamoDB Policy
  policy_name="dynamo-full-user-visits-api"
  aws iam create-policy --policy-name ${policy_name} --policy-document file://../../IAM/dynamo-full-user-comments.json --profile ${profile}
  
  #Attach Policy for API Gateway to access DynamoDB
  role_policy_arn="arn:aws:iam::${aws_account_id}:policy/${policy_name}"
  aws iam attach-role-policy \
      --role-name "${role_name}" \
      --policy-arn "${role_policy_arn}"  --profile ${profile}
  </code></pre>
  
  <p>Which returns the error: </p>
  
  <pre><code>aws: error: argument --profile: expected one argument
  usage: aws [options] &lt;command&gt; &lt;subcommand&gt; [&lt;subcommand&gt; ...] [parameters]
  </code></pre>
  
  <p>The two changes I made were:</p>
  
  <p><code>. ./common-variables.sh</code>-><code>common-variables.sh</code></p>
  
  <p><code>aws iam create-policy --policy-name ${policy_name} --policy-document file://../../IAM/dynamo-full-user-comments.json --profile ${profile}</code> </p>
  
  <p>-> <code>aws iam create-policy --policy-name ${policy_name} --policy-document file:IAM/dynamo-full-user-comments.json --profile ${profile}</code></p>
  
  <p>The changes I made were because I have the common variables file in the same directory as this script.</p>