Problem description
A signed request that includes virtual private cloud (VPC) access restrictions was not initiated from the specified VPC.
Causes
The VPC from which the request was initiated does not meet the signature requirements. This typically happens in one of two ways:
Client outside the VPC whitelist: The allowed VPC was specified when the signature was generated, but the client sending the signed URL request is not in the VPC whitelist.
Signature mismatch: An error occurred during signature calculation, so the signature in the request does not match the signature that OSS calculated.
Examples
The VPC that is allowed to access Object Storage Service (OSS) resources is specified when the signature is generated. However, when the signed URL is used to initiate a request, the client is not in the VPC whitelist.
An error occurs during signature calculation. As a result, the signature in the request does not match the signature calculated by OSS.
Solutions
Work through the following steps to identify and fix the issue.
Step 1: Confirm the client is in the correct VPC.
Make sure the signed URL is accessed from within the VPC specified during signature generation.
Step 2: Verify your signature parameters.
Check that all parameters used during signature generation are correct. For more information, see Add signatures to URLs.
Step 3: Use Alibaba Cloud SDKs to generate signatures.
If you are computing signatures manually, switch to Alibaba Cloud SDKs. SDKs handle signature generation automatically, eliminating manual calculation errors. For more information, see Overview.