I am an AWS newbie and I am working on an Expo/React Native project. My Expo frontend relies on amplify_outputs.json
in order to be built, but I want this file to be generated programmatically during the cloud EAS (Expo Application Services) build process, so I created a post-install build hook which runs…
npx ampx generate outputs --branch develop --app-id $APP_ID
However, this command requires AWS credentials, and I was wondering what would be a best practice way to give EAS access to AWS. I can’t use the AWS CLI since the above command is being ran from the EAS build pipeline.
Just to test the build process out, I stored AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN in EAS secrets and it worked. But this of course was just a temporary solution since the session ultimately expires.
Harris Bubalo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.