Awscli on Mac OS image?

I added an s3 copy command to my deployment section:

deployment:
  beta_distribution:
    branch: master
    commands:
      - bundle exec fastlane ios ci
      - aws s3 cp "build/AppName.ipa" s3://bucket/app/ios/appname-ios-b${CIRCLE_BUILD_NUM}.ipa

And got “aws not found”:

aws s3 cp "build/AppName.ipa" s3://bucket/app/ios/appname-ios-b${CIRCLE_BUILD_NUM}.ipa
bash: line 1: aws: command not found

What’s the recommended way to get the awscli app onto a mac os image, or did I miss something?

Bonus question, how do I get the build number in there…it doesn’t seem like that incantation passed it through to the environment correctly.

Have you tried brew install awscli?

I also would have thought ${CIRCLE_BUILD_NUM} would have worked since it is the documented variable: https://circleci.com/docs/environment-variables/

How about adding a step in your fastfile to mv the file or putting your upload command into a file such as upload.sh and using the variable in there?