Optional: Verify the integrity of the AWS SAM CLI installer (original) (raw)
When installing the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) using a package installer, you can verify its integrity before installation. This is an optional, but highly recommended step.
The two options of verification available to you are:
- Verify the package installer signature file.
- Verify the package installer hash value.
When available for your platform, we recommend verifying the signature file option. This option offers an extra layer of security since the key values are published here and managed separately from our GitHub repository.
Topics
Verify the installer signature file
Linux
arm64 - command line installer
AWS SAM uses GnuPG to sign the AWS SAM CLI .zip installer. Verification is performed in the following steps:
- Use the primary public key to verify the signer public key.
- Use the signer public key to verify the AWS SAM CLI package installer.
To verify the integrity of the signer public key
- Copy the primary public key and save it to your local machine as a
.txt
file. For example,`primary-public-key.txt`
.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQINBGRuSzMBEADsqiwOy78w7F4+sshaMFRIwRGNRm94p5Qey2KMZBxekFtoryVD
D9jEOnvupx4tvhfBHz5EcUHCEOdl4MTqdBy6vVAshozgxVb9RE8JpECn5lw7XC69
4Y7Gy1TKKQMEWtDXElkGxIFdUWvWjSnPlzfnoXwQYGeE93CUS3h5dImP22Yk1Ct6
eGGhlcbg1X4L8EpFMj7GvcsU8f7ziVI/PyC1Xwy39Q8/I67ip5eU5ddxO/xHqrbL
YC7+8pJPbRMej2twT2LrcpWWYAbprMtRoa6WfE0/thoo3xhHpIMHdPfAA86ZNGIN
kRLjGUg7jnPTRW4Oin3pCc8nT4Tfc1QERkHm641gTC/jUvpmQsM6h/FUVP2i5iE/
JHpJcMuL2Mg6zDo3x+3gTCf+Wqz3rZzxB+wQT3yryZs6efcQy7nROiRxYBxCSXX0
2cNYzsYLb/bYaW8yqWIHD5IqKhw269gp2E5Khs60zgS3CorMb5/xHgXjUCVgcu8a
a8ncdf9fjl3WS5p0ohetPbO2ZjWv+MaqrZOmUIgKbA4RpWZ/fU97P5BW9ylwmIDB
sWy0cMxg8MlvSdLytPieogaM0qMg3u5qXRGBr6Wmevkty0qgnmpGGc5zPiUbtOE8
CnFFqyxBpj5IOnG0KZGVihvn+iRxrv6GO7WWO92+Dc6m94U0EEiBR7QiOwARAQAB
tDRBV1MgU0FNIENMSSBQcmltYXJ5IDxhd3Mtc2FtLWNsaS1wcmltYXJ5QGFtYXpv
bi5jb20+iQI/BBMBCQApBQJkbkszAhsvBQkHhM4ABwsJCAcDAgEGFQgCCQoLBBYC
AwECHgECF4AACgkQQv1fenOtiFqTuhAAzi5+ju5UVOWqHKevOJSO08T4QB8HcqAE
SVO3mY6/j29knkcL8ubZP/DbpV7QpHPI2PB5qSXsiDTP3IYPbeY78zHSDjljaIK3
njJLMScFeGPyfPpwMsuY4nzrRIgAtXShPA8N/k4ZJcafnpNqKj7QnPxiC1KaIQWm
pOtvb8msUF3/s0UTa5Ys/lNRhVC0eGg32ogXGdojZA2kHZWdm9udLo4CDrDcrQT7
NtDcJASapXSQL63XfAS3snEc4e1941YxcjfYZ33rel8K9juyDZfi1slWR/L3AviI
QFIaqSHzyOtP1oinUkoVwL8ThevKD3Ag9CZflZLzNCV7yqlF8RlhEZ4zcE/3s9El
WzCFsozb5HfE1AZonmrDh3SyOEIBMcS6vG5dWnvJrAuSYv2rX38++K5Pr/MIAfOX
DOI1rtA+XDsHNv9lSwSy0lt+iClawZANO9IXCiN1rOYcVQlwzDFwCNWDgkwdOqS0
gOA2f8NF9lE5nBbeEuYquoOl1Vy8+ICbgOFs9LoWZlnVh7/RyY6ssowiU9vGUnHI
L8f9jqRspIz/Fm3JD86ntZxLVGkeZUz62FqErdohYfkFIVcv7GONTEyrz5HLlnpv
FJ0MR0HjrMrZrnOVZnwBKhpbLocTsH+3t5It4ReYEX0f1DIOL/KRwPvjMvBVkXY5
hblRVDQoOWc=
=d9oG
-----END PGP PUBLIC KEY BLOCK----- - Import the primary public key to your keyring.
$ gpg --import primary-public-key.txt
gpg: directory `/home/.../.gnupg' created
gpg: new configuration file `/home/.../.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/.../.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/.../.gnupg/secring.gpg' created
gpg: keyring `/home/.../.gnupg/pubring.gpg' created
gpg: /home/.../.gnupg/trustdb.gpg: trustdb created
gpg: key 73AD885A: public key "AWS SAM CLI Primary <aws-sam-cli-primary@amazon.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
- Copy the signer public key and save it to your local machine as a
.txt
file. For example,`signer-public-key.txt`
.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQINBGRtS20BEAC7GjaAwverrB1zNEu2q3EGI6HC37WzwL5dy30f4LirZOWS3piK
oKfTqPjXPrLCf1GL2mMqUSgSnpEbPNXuvWTW1CfSnnjwuH8ZqbvvUQyHJwQyYpKm
KMwb+8V0bzzQkMzDVqolYQCi5XyGpAuo3wroxXSzG6r/mIhbiq3aRnL+2lo4XOYk
r7q9bhBqbJhzjkm7N62PhPWmi/+/EGdEBakA1pReE+cKjP2UAp5L6CPShQl2fRKL
9BumitNfFHHs1JZgZSCCruiWny3XkUaXUEMfyoE9nNbfqNvuqV2KjWguZCXASgz2
ZSPF4DTVIBMfP+xrZGQSWdGU/67QdysDQW81TbFOjK9ZsRwwGC4kbg/K98IsCNHT
ril5RZbyr8pw3fw7jYjjI2ElAacRWp53iRzvutm5AruPpLfoKDQ/tKzBUYItBwlu
Z/diKgcqtw7xDlyqNyTN8xFPFqMO2I8IsZ2Pdl131htdFiZMiin1RQG9pV9p2vHS
eQVY2uKCnvnA6vFCQYKXP7p0IwReuPNzDvECUsidw8VTakTqZsANT/bU17e4KuKn
+JgbNrKOasJX37sDb/9ruysozLvy78ozYKJDLmC3yoRQ8DhEjviT4cnjORgNmvnZ
0a5AA/DJPQW4buRrXdxu+fITzBxQn2+GO/iDNCxtJaq5SYVBKjTmTWPUJwARAQAB
tDBBV1MgU0FNIENMSSBUZWFtIDxhd3Mtc2FtLWNsaS1zaWduZXJAYW1hem9uLmNv
bT6JAj8EEw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XHbgdhW9pcZXDIktVf7
j9wehsWOyYXiRgR0dz7DI26AUG4JLh5FTtx9XuSBdEsI69Jd4dJuibmgtImzbZjn
7un8DJWIyqi7Ckk96Tr4oXB9mYAXaWlR4C9j5XJhMNZgkOycuY2DADnbGmSb+1kA
ju77H4ff84+vMDwUzUt2Wwb+GjzXu2g6Wh+bWhGSirYlel+6xYrI6beu1BDCFLq+
VZFE8WggjJHpwcL7CiqadfVIQaw4HY0jQFTSdwzPWhJvYjXFOhMkyCcjssbtmB+z
/otfgySyQqThrD48RWS5GuyqCA+pK3UNmEJ11c1AXMdTn2VWInR1NOJNALQ2du3y
q8t1vMsErVOJ7pkZ50F4ef17PE6DKrXX8ilwGFyVuX5ddyt/t9J5pC3sRwHWXVZx
GXwoX75FwIEHA3n5Q7rZ69Ea6Q==
=ZIO7
-----END PGP PUBLIC KEY BLOCK----- - Import the signer public key to your keyring.
$ gpg --import signer-public-key.txt
gpg: key FE0ADDFA: public key "AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
gpg: no ultimately trusted keys found
Take note of the key value from the output. For example, `FE0ADDFA`
.
5. Use the key value to obtain and verify the signer public key fingerprint.
$ gpg --fingerprint FE0ADDFA
pub 4096R/FE0ADDFA 2023-05-23 [expires: 2025-05-22]
Key fingerprint = 37D8 BE16 0355 2DA7 BD6A 04D8 C7A0 5F43 FE0A DDFA
uid AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>
The fingerprint should match the following:
37D8 BE16 0355 2DA7 BD6A 04D8 C7A0 5F43 FE0A DDFA
If the fingerprint string doesn’t match, do not use the AWS SAM CLI installer. Escalate to the AWS SAM team by creating an issue in the aws-sam-cli GitHub repository.
6. Verify the signatures of the signer public key:
$ gpg --check-sigs FE0ADDFA
pub 4096R/FE0ADDFA 2023-05-23 [expires: 2025-05-22]
uid AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>
sig!3 FE0ADDFA 2023-05-23 AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>
sig! 73AD885A 2023-05-24 AWS SAM CLI Primary <aws-sam-cli-primary@amazon.com>
If you see 1 signature not checked due to a missing key
, repeat the previous steps to import the primary and signer public keys to your keyring.
You should see the key values for both the primary public key and signer public key listed.
Now that you have verified the integrity of the signer public key, you can use the signer public key to verify the AWS SAM CLI package installer.
To verify the integrity of the AWS SAM CLI package installer
- Obtain the AWS SAM CLI package signature file – Download the signature file for the AWS SAM CLI package installer by using the following command:
$ wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-arm64.zip.sig
- Verify the signature file – Pass both the downloaded
.sig
and.zip
files as parameters to thegpg
command. The following is an example:
$ gpg --verify aws-sam-cli-linux-arm64.zip.sig aws-sam-cli-linux-arm64.zip
The output should look similar to the following:
gpg: Signature made Tue 30 May 2023 10:03:57 AM UTC using RSA key ID FE0ADDFA
gpg: Good signature from "AWS SAM CLI Team aws-sam-cli-signer@amazon.com"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 37D8 BE16 0355 2DA7 BD6A 04D8 C7A0 5F43 FE0A DDFA
- The
WARNING: This key is not certified with a trusted signature!
message can be ignored. It occurs because there isn’t a chain of trust between your personal PGP key (if you have one) and the AWS SAM CLI PGP key. For more information, see Web of trust. - If the output contains the phrase
BAD signature
, check that you performed the procedure correctly. If you continue to get this response, escalate to the AWS SAM team by creating an issue in the aws-sam-cli GitHub repository and avoid using the downloaded file.
TheGood signature from "AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>"
message means that the signature is verified and you can move forward with installation.
x86_64 - command line installer
AWS SAM uses GnuPG to sign the AWS SAM CLI .zip installer. Verification is performed in the following steps:
- Use the primary public key to verify the signer public key.
- Use the signer public key to verify the AWS SAM CLI package installer.
To verify the integrity of the signer public key
- Copy the primary public key and save it to your local machine as a
.txt
file. For example,`primary-public-key.txt`
.
-----BEGIN PGP PUBLIC KEY BLOCK-----
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msUF3/s0UTa5Ys/lNRhVC0eGg32ogXGdojZA2kHZWdm9udLo4CDrDcrQT7
NtDcJASapXSQL63XfAS3snEc4e1941YxcjfYZ33rel8K9juyDZfi1slWR/L3AviI
QFIaqSHzyOtP1oinUkoVwL8ThevKD3Ag9CZflZLzNCV7yqlF8RlhEZ4zcE/3s9El
WzCFsozb5HfE1AZonmrDh3SyOEIBMcS6vG5dWnvJrAuSYv2rX38++K5Pr/MIAfOX
DOI1rtA+XDsHNv9lSwSy0lt+iClawZANO9IXCiN1rOYcVQlwzDFwCNWDgkwdOqS0
gOA2f8NF9lE5nBbeEuYquoOl1Vy8+ICbgOFs9LoWZlnVh7/RyY6ssowiU9vGUnHI
L8f9jqRspIz/Fm3JD86ntZxLVGkeZUz62FqErdohYfkFIVcv7GONTEyrz5HLlnpv
FJ0MR0HjrMrZrnOVZnwBKhpbLocTsH+3t5It4ReYEX0f1DIOL/KRwPvjMvBVkXY5
hblRVDQoOWc=
=d9oG
-----END PGP PUBLIC KEY BLOCK----- - Import the primary public key to your keyring.
$ gpg --import primary-public-key.txt
gpg: directory `/home/.../.gnupg' created
gpg: new configuration file `/home/.../.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/.../.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/.../.gnupg/secring.gpg' created
gpg: keyring `/home/.../.gnupg/pubring.gpg' created
gpg: /home/.../.gnupg/trustdb.gpg: trustdb created
gpg: key 73AD885A: public key "AWS SAM CLI Primary <aws-sam-cli-primary@amazon.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
- Copy the signer public key and save it to your local machine as a
.txt
file. For example,`signer-public-key.txt`
.
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQINBGRtS20BEAC7GjaAwverrB1zNEu2q3EGI6HC37WzwL5dy30f4LirZOWS3piK
oKfTqPjXPrLCf1GL2mMqUSgSnpEbPNXuvWTW1CfSnnjwuH8ZqbvvUQy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XwoX75FwIEHA3n5Q7rZ69Ea6Q==
=ZIO7
-----END PGP PUBLIC KEY BLOCK----- - Import the signer public key to your keyring.
$ gpg --import signer-public-key.txt
gpg: key FE0ADDFA: public key "AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
gpg: no ultimately trusted keys found
Take note of the key value from the output. For example, `FE0ADDFA`
.
5. Use the key value to obtain and verify the signer public key fingerprint.
$ gpg --fingerprint FE0ADDFA
pub 4096R/FE0ADDFA 2023-05-23 [expires: 2025-05-22]
Key fingerprint = 37D8 BE16 0355 2DA7 BD6A 04D8 C7A0 5F43 FE0A DDFA
uid AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>
The fingerprint should match the following:
37D8 BE16 0355 2DA7 BD6A 04D8 C7A0 5F43 FE0A DDFA
If the fingerprint string doesn’t match, do not use the AWS SAM CLI installer. Escalate to the AWS SAM team by creating an issue in the aws-sam-cli GitHub repository.
6. Verify the signatures of the signer public key:
$ gpg --check-sigs FE0ADDFA
pub 4096R/FE0ADDFA 2023-05-23 [expires: 2025-05-22]
uid AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>
sig!3 FE0ADDFA 2023-05-23 AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>
sig! 73AD885A 2023-05-24 AWS SAM CLI Primary <aws-sam-cli-primary@amazon.com>
If you see 1 signature not checked due to a missing key
, repeat the previous steps to import the primary and signer public keys to your keyring.
You should see the key values for both the primary public key and signer public key listed.
Now that you have verified the integrity of the signer public key, you can use the signer public key to verify the AWS SAM CLI package installer.
To verify the integrity of the AWS SAM CLI package installer
- Obtain the AWS SAM CLI package signature file – Download the signature file for the AWS SAM CLI package installer by using the following command:
$ wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip.sig
- Verify the signature file – Pass both the downloaded
.sig
and.zip
files as parameters to thegpg
command. The following is an example:
$ gpg --verify aws-sam-cli-linux-x86_64.zip.sig aws-sam-cli-linux-x86_64.zip
The output should look similar to the following:
gpg: Signature made Tue 30 May 2023 10:03:57 AM UTC using RSA key ID FE0ADDFA
gpg: Good signature from "AWS SAM CLI Team aws-sam-cli-signer@amazon.com"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 37D8 BE16 0355 2DA7 BD6A 04D8 C7A0 5F43 FE0A DDFA
- The
WARNING: This key is not certified with a trusted signature!
message can be ignored. It occurs because there isn’t a chain of trust between your personal PGP key (if you have one) and the AWS SAM CLI PGP key. For more information, see Web of trust. - If the output contains the phrase
BAD signature
, check that you performed the procedure correctly. If you continue to get this response, escalate to the AWS SAM team by creating an issue in the aws-sam-cli GitHub repository and avoid using the downloaded file.
TheGood signature from "AWS SAM CLI Team <aws-sam-cli-signer@amazon.com>"
message means that the signature is verified and you can move forward with installation.
macOS
GUI and command line installer
You can verify the integrity of the AWS SAM CLI package installer signature file by using the pkgutil
tool or manually.
To verify using pkgutil
- Run the following command, providing the path to the downloaded installer on your local machine:
$ pkgutil --check-signature /path/to/aws-sam-cli-installer.pkg
The following is an example:
$ pkgutil --check-signature /Users/user/Downloads/aws-sam-cli-macos-arm64.pkg
- From the output, locate the SHA256 fingerprint for Developer ID Installer: AMZN Mobile LLC. The following is an example:
Package "aws-sam-cli-macos-arm64.pkg":
Status: signed by a developer certificate issued by Apple for distribution
Notarization: trusted by the Apple notary service
Signed with a trusted timestamp on: 2023-05-16 20:29:29 +0000
Certificate Chain:
Developer ID Installer: AMZN Mobile LLC (94KV3E626L)
Expires: 2027-06-28 22:57:06 +0000
SHA256 Fingerprint:
49 68 39 4A BA 83 3B F0 CC 5E 98 3B E7 C1 72 AC 85 97 65 18 B9 4C
BA 34 62 BF E9 23 76 98 C5 DA
Developer ID Certification Authority
Expires: 2031-09-17 00:00:00 +0000
SHA256 Fingerprint:
F1 6C D3 C5 4C 7F 83 CE A4 BF 1A 3E 6A 08 19 C8 AA A8 E4 A1 52 8F
D1 44 71 5F 35 06 43 D2 DF 3A- Apple Root CA
Expires: 2035-02-09 21:40:36 +0000
SHA256 Fingerprint:
B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C
68 C5 BE 91 B5 A1 10 01 F0 24
- The Developer ID Installer: AMZN Mobile LLC SHA256 fingerprint should match the following value:
49 68 39 4A BA 83 3B F0 CC 5E 98 3B E7 C1 72 AC 85 97 65 18 B9 4C BA 34 62 BF E9 23 76 98 C5 DA
If the fingerprint string doesn’t match, do not use the AWS SAM CLI installer. Escalate to the AWS SAM team by creating an issue in the aws-sam-cli GitHub repository. If the fingerprint string does match, you can move forward with using the package installer.
Windows
The AWS SAM CLI installer is packaged as MSI files for the Windows operating system.
To verify the integrity of the installer
- Right-click on the installer and open the Properties window.
- Choose the Digital Signatures tab.
- From the Signature List, choose Amazon Web Services, Inc., and then choose Details.
- Choose the General tab, if not already selected, and then choose View Certificate.
- Choose the Details tab, and then choose All in theShow dropdown list, if not already selected.
- Scroll down until you see the Thumbprint field and then chooseThumbprint. This displays the entire thumbprint value in the lower window.
- Match the thumbprint value to the following value. If the value matches, move forward with installation. If not, escalate to the AWS SAM team by creating an issue in the aws-sam-cli GitHub repository.
d52eb68bffe6ae165b3b05c3e1f9cc66da7eeac0
Verify the hash value
Linux
x86_64 - command line installer
Verify the integrity and authenticity of the downloaded installer files by generating a hash value using the following command:
$ sha256sum aws-sam-cli-linux-x86_64.zip
The output should look like the following example:
<64-character SHA256 hash value>
aws-sam-cli-linux-x86_64.zip
Compare the 64-character SHA-256 hash value with the one for your desired AWS SAM CLI version in the AWS SAM CLI release notes on GitHub.
macOS
GUI and command line installer
Verify the integrity and authenticity of the downloaded installer by generating a hash value using the following command:
$ shasum -a 256 path-to-pkg-installer/name-of-pkg-installer
# Examples
$ shasum -a 256 ~/Downloads/aws-sam-cli-macos-arm64.pkg
$ shasum -a 256 ~/Downloads/aws-sam-cli-macos-x86_64.pkg
Compare your 64-character SHA-256 hash value with the corresponding value in theAWS SAM CLI release notes GitHub repository.