openssl: AWS EC2 instance identity document can not be verified with libressl

I'm trying to follow the steps here:

to verify an instance identity document, and I'm having success when I run on the instance (with OpenSSL 1.0.2k-fips January 26, 2017) and the failure on my Macbook (with LibreSSL 2.2.7).

I have made a diff of the files and there is no difference. SHA1 included below.

Is there any obvious reason for this to fail? I'm not sure where to go from here.

In the instance:

[ec2-user@ip-10-215-73-128 ~]$ openssl smime -verify -in $ PKCS7 -inform PEM -content $ DOCUMENT -certfile AWSpubkey -noverify> / dev / null
Successful verification

[ec2-user@ip-10-215-73-128 ~]$ ls
[ec2-user@ip-10-215-73-128 ~]$ echo $ DOCUMENT
/ tmp / iid
[ec2-user@ip-10-215-73-128 ~]$ echo $ PKCS7
[ec2-user@ip-10-215-73-128 ~]$ openssl version
OpenSSL 1.0.2k-fips January 26, 2017

[ec2-user@ip-10-215-73-128 ~]$ sha1sum $ DOCUMENT
0ab2144f3a388f9ab211fcc61b79d9c3996aae13 / tmp / iid
[ec2-user@ip-10-215-73-128 ~]$ sha1sum $ PKCS7
986e701e30828217a3289a79df2759beda5eacc2 /tmp/iid.pkcs7
[ec2-user@ip-10-215-73-128 ~]$ sha1sum AWSpubkey
58f35f20bd57ec01773c29d08ff813c6b6479837 AWSpubkey

In the zone:

$ openssl smime -verify -in $ PKCS7 -inform PEM -content $ DOCUMENT -certfile AWSpubkey -noverify> / dev / null
Verification failure
140735950726088: error: 21075076: PKCS7 routines: PKCS7_verify: content and data present: /BuildRoot/Library/Caches/

$ ls
AWSpubkey iid.pkcs7 instance.iid
$ echo $ DOCUMENT
$ echo $ PKCS7
$ openssl version
LibreSSL 2.2.7

$ sha1sum $ DOCUMENT
0ab2144f3a388f9ab211fcc61b79d9c3996aae13 instance.iid
$ sha1sum $ PKCS7
986e701e30828217a3289a79df2759beda5eacc2 iid.pkcs7
$ sha1sum AWSpubkey
58f35f20bd57ec01773c29d08ff813c6b6479837 AWSpubkey