Please note that Bitnami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system. For that reason, it is not possible to upgrade one component of the stack (in this case PHP).
You need to upgrade de full stack and then restore your files. You should launch a new cloud image with the latest version, and then migrate your data there. This documentation is useful to migrate WP:
With the steps above, you would have WP with the latest PHP 7.1 version.
I hope it helps