

release and prepub in SCF function B, which temporarily point to the $LATEST version.
2. Create an API gateway:
Create API service A in API Gateway, configure the API to point to the release alias of function B, and publish it to the release stage of the API service. For more information on how to create and publish an API, please see API Creation and API Release.
3. Modify API configuration:
a. Point the API to the prepub alias of function B and publish it into the prepub stage of the API service.
b. Point the API to the default traffic of function B and publish it into the dev stage of the API service.$LATEST version. API Gateway configuration is completed, and there will be no need to modify and publish the API Gateway configuration again.$DEFAULT alias to point it to the $LATEST version, you can perform continuous development based on this version. After development is completed, the version can be published.
3. Test in the pre-release environment:
When version 3 can enter the pre-release environment, if the prepub alias of function B is configured to point to version 3, version 3 can be tested and trialed in the pre-release environment.
4. Implement grayscale release by user in the pre-release environment:
If version 4 can enter the pre-release environment, calls of user Bob need to be routed to version 4 of function B, calls of other users need to be routed to version 3, and the prepub alias of function B needs to be configured for routing by rule with the content invoke.headers.User exact Bob. For more information on routing by rule, please see Routing by Rule.
5. Enter the release environment from the pre-release environment and implement grayscale release:
If version 2 has been trialed in the pre-release environment and can be launched, gradually switch the traffic configuration of the release alias of function B from version 1 to 2 and continuously observe the function status during the grayscale release. For more information on how to configure alias traffic, please see SCF Traffic Routing Configuration.
6. Continuously monitor during release:
View the grayscale release process through monitoring information and logs and check whether the traffic of version 2/1 increases/decreases normally, errors of each version during the release, and overall errors.release alias of function B to point all of its traffic to version 1.
release and prepub in SCF function B, which temporarily point to the $LATEST version.$DEFAULT alias to point it to the $LATEST version, you can perform continuous development based on this version. After development is completed, the version can be published.
3. Test in the pre-release environment:
When version 3 can enter the pre-release environment, if the prepub alias of function B is configured to point to version 3, version 3 can be tested and trialed in the pre-release environment.
4. Route by rule in the pre-release environment:
If version 4 can enter the pre-release environment, you can configure routing by rule for function B. Customize the key and value passed in to point them to version 4. When calling the invoke API, retain the key-value pair in the RoutingKey input parameter in json format. If RoutingKey has any key-value pair matching the rule, version 4 will be routed to. For more information on routing by rule, please see Routing by Rule and Running Function Through API.
5. Enter the release environment from the pre-release environment and implement grayscale release:
If version 2 has been trialed in the pre-release environment and can be launched, gradually switch the traffic configuration of the release alias of function B from version 1 to 2 and continuously observe the function status during the grayscale release. For more information on how to configure alias traffic, please see SCF Traffic Routing Configuration.
6. Continuously monitor during release:
View the grayscale release process through monitoring information and logs and check whether the traffic of version 2/1 increases/decreases normally, errors of each version during the release, and overall errors.release alias of function B to point all of its traffic to version 1.scf deploy --inputs.traffic=0.1 # Deploy and switch 10% traffic to the `$latest` versionscf deploy --inputs.traffic=1.0 # Deploy and switch 100% traffic to the `$latest` versionscf deploy --inputs.traffic=1.0 # Deploy and switch 100% traffic to the `$latest` version
Feedback