With increasingly powerful iPhone and iPad hardware, iOS (and iPadOS) has become an increasingly viable platform for light software development and administration tasks. While software is still a limiting factor, some apps that have been recently released expand the capabilities of these devices considerably.
The a-Shell app allows for a relatively limited but still powerful set of shell commands and scripts to be run on iOS. It’s possible to use the AWS CLI v1 directly using this app without having to SSH into another machine.
CLI v1
Installing the v1 CLI is relatively straightforward because it’s available through pip:
pip3 install awscli
aws --version
You should then be able to use aws configure and other commands as you would normally, keeping in mind the limitations of working within iOS.
It’s worth noting that files and folders cannot be created in the home directory due to the limitations imposed by iOS’s sandbox. By default the app works around this by setting some environment variables (including AWS-related ones) to be in the ~/Documents folder instead. If you encounter other issues, you might be able to further work around them by changing other environment variables. For example, you might temporarily change the $HOME environment variable:
dash
HOME="~/Documents"
...
CLI v2
Amazon has not made the v2 CLI available via pip as part of a decision to decouple the CLI from its Python implementation. Even if they did, its dependencies require the use of C libraries, which would make it very difficult at best to get running in a-Shell itself (at least for now).
There are still some options available to use the newer CLI, however.
AWS CloudShell
CloudShell is usable from iOS devices, though a hardware keyboard is highly recommended due to the lack of software arrow keys. You can even upload and download files as you would expect.
SSH
There are a number of SSH clients for iOS, including a-Shell. You can access v2 of the CLI on another device, such as EC2 instance or your regular development machine.
I hope these suggestions will help you improve your workflow, or at least to discover that your iPhone or iPad is capable of more than you might have imagined. If you have any questions or suggestions, feel free to leave a comment below.