Rscript not working with packaged R for AWS Lambda

I'm trying to run an R script on the command line of an AWS EC2 instance using packaged R binaries and libraries (without installation) -- the point is to test the script for deployment to AWS Lambda. I followed these instructions. The instructions are for packaging up all the R binaries and libraries in a zip file and moving everything to a Amazon EC2 instance for testing. I unzipped everything on the new machine, ran 'sudo yum update' on the machine, and set R's environment variables to point to the proper location:

export R_HOME=$HOME
export LD_LIBRARY_PATH=$HOME/lib

NOTE: $HOME is equal to /home/ec2-user.

I created this hello_world.R file to test:

#!/home/ec2-user/bin/Rscript
print ("Hello World!")

But when I ran this:

ec2-user$ Rscript hello_world.R

I got the following error:

Rscript execution error: No such file or directory

So I checked the path, but everything checks out:

ec2-user$ whereis Rscript
Rscript: /home/ec2-user/bin/Rscript

ec2-user$ whereis R
R: /home/ec2-user/bin/R /home/ec2-user/R

But when I tried to evaluate an expression using Rscript at the command line, I got this:

It seems Rscript is still looking for R in the default location '/usr/lib64/R/bin/R' even though my R_HOME variable is set to '/home/ec2-user':

ec2-user$ echo $R_HOME
/home/ec2-user

I've found sprinkles of support, but I can't find anything that addresses my specific issue. Some people have suggested reinstalling R, but my understanding is, for the purposes of Lambda, everything needs to be self-contained so I installed R on a separate EC2 instance, then packaged it up. I should mention that everything runs fine on the machine where R was installed with the package manager.