Project Migration fun2s
fun2s is used to convert the configuration of a function into the s.yaml format so that it can be identified by Serverless Devs.
Parameter Parsing
Parameter Name |
Abbreviation |
Required in CLI |
Description |
---|---|---|---|
region |
- |
Yes |
Region |
function-name |
- |
Yes |
Function name |
target |
- |
No |
Path of the generated Serverless Devs configuration file (s.yaml by default) |
This command also supports some global parameters, such as -a/--access and --debug. For details, see Global Parameters of Serverless Devs.
Examples
s cli fgs fun2s --region cn-north-4 --function-name fgs-deploy-test --target ./s.yml Tips for next step ====================== * Deploy Function: s deploy -t ./s.yml
In this way, you can convert the original function configuration into s.yaml so that it complies with Serverless Devs specifications.
edition: 1.0.0 name: transform_fun access: default vars: region: cn-north-4 functionName: fgs-deploy-test services: component-test: # Service name component: fgs # Component name props: region: ${vars.region} function: functionName: ${vars.functionName} handler: index.handler memorySize: 256 timeout: 300 runtime: Node.js14.18 codeType: zip code: codeUri: ./code
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot