Skip to main content

Running Remote Tasks

How to run rakes/tasks in remote environments

After you've deployed your rake task code in production, use the new run_task script to run any rake task in DEV or PROD.

1. Enable script

The rake_task.rb script is now in the code base, in the /script folder.

After you pull it the first time, make the script executable:

chmod +x ./script/run_task.rb

2. Log into AWS SSO

Login to AWS SSO using prod credentials:

aws sso login --profile arc-prod

3. Run the script

In root of arc-api, run:

bundle exec ruby script/run_task.rb <dev|prod> rake <my_namespace:my_task>