Skip to content

Troubleshooting for AWS S3

SSL: CERTIFICATE_VERIFY_FAILED Error in AWS CLI

Perform the follwoing steps to resolve the SSL: CERTIFICATE_VERIFY_FAILED error encountered while using the AWS CLI.

  1. Install certifi for your operating system:
    • For Ubuntu:
      Bash
      pip3 install certifi
      
    • For macOS:
      Bash
      brew install certifi
      
  2. Run the following command to locate the cacert.pem file.
    Bash
    python3 -m certifi
    
    This command will display the full path of the cacert.pem file. Copy this path for use in the following step.
  3. Open the privacera_aws.sh file.
    Bash
    vi privacera_aws.sh
    
    • Locate the variable named PYTHON_DEFAULT_CACERT_FILE within the script.
      Bash
      PYTHON_DEFAULT_CACERT_FILE="<location>/cacert.pem
      
    • Update the variable value by replacing <location>/cacert.pem with the copied path to your cacert.pem file obtained in the preceding step.
  4. Run the following command to disable the endpoint:
    Bash
    . ~/privacera_aws.sh --disable-endpoint
    
  5. Subsequently, run the following command enable the endpoint:
    Bash
    . ~/privacera_aws.sh --enable-endpoint
    
  6. Run AWS CLI commands.

Proxy Authentication Required error in AWS CLI

If you encounter the error An error occurred (407) when calling the ListObjectsV2 operation: Proxy Authentication Required or Unable to locate credentials, perform following steps:

  1. Unset AWS_DEFAULT_PROFILE:
    • Ensure that the AWS_DEFAULT_PROFILE environment variable is unset. This can prevent conflicts with default AWS CLI profiles.
    • To unset the variable, use the following command:
      Bash
      unset AWS_DEFAULT_PROFILE
      
  2. Additional Checks:
    • Permissions:
      • Verify that the necessary permissions are granted for the operation. Check the audits to see if permission was denied. If so, create the required policy to grant access.
    • Privacera Tokens:
      • Ensure that the Privacera Access Token and Privacera Secret Token used in your privacera_aws.sh file are correctly configured. These tokens are crucial for authenticating with Privacera services.

Comments