Which of the following is the recommended method to install the AWS CLI on a Windows machine to ensure automatic updates?
Consider which method is officially supported and provides easy updates.
The MSI installer from AWS is the official recommended method for Windows. It sets up the CLI properly and supports automatic updates. Using pip is possible but not recommended on Windows for AWS CLI v2. The Windows Store does not offer AWS CLI. Manual extraction lacks update support.
After installing AWS CLI version 2 on a Linux system, which command correctly verifies the installed version?
Think about the standard way most command-line tools show their version.
The correct command to check AWS CLI version is aws --version. Other options are invalid or produce errors.
You need to write automation scripts that interact with AWS services on a macOS system. Which AWS CLI version should you install to ensure compatibility with the latest AWS features and long-term support?
Consider which version is actively maintained and officially recommended for new features.
AWS CLI version 2 is the current major version with new features and support. Installing it via the official bundled installer on macOS ensures compatibility and updates. Version 1 is deprecated. Manual compilation is not supported for AWS CLI v2.
After installing AWS CLI on a Linux server, what is the best practice to securely store AWS credentials for automated scripts?
Think about protecting sensitive information and limiting access.
The recommended practice is to store credentials in the ~/.aws/credentials file with permissions set to allow only the user to read it. Embedding keys in scripts or environment variables globally risks exposure. Anonymous access is not practical for most AWS operations.
You installed AWS CLI version 1 on a Windows machine. You try to run a command for a new AWS service released recently, but it fails with 'Unknown command'. What is the most likely reason?
Consider the relationship between AWS CLI versions and service support.
AWS CLI version 1 is no longer updated with new service commands. New AWS services require AWS CLI version 2 or later. While region and syntax issues can cause errors, the specific 'Unknown command' error for a new service usually means the CLI version is outdated.