How-to guides
Users can create the service by entering the required information for Cloud Functions and selecting detailed options through the Samsung Cloud Platform Console.
Creating Cloud Functions
All Services > Compute > Cloud Functions Click the menu. 1. Go to the Service Home page of Cloud Functions.
On the Service Home page, click the Create Cloud Functions button. 2. Go to the Create Cloud Functions page.
On the Create Cloud Functions page, enter the information required to create the service.
Category RequiredDetailed description Function name Required Enter the name of the Funtion to create - Start with a lowercase English letter and use lowercase English letters, numbers, and special characters (
-) to enter between 3 and 64 characters
Runtime Required Select Runtime creation method - New: Create a new Runtime
- Start with Blueprint: Write using the Runtime source code provided by the service
Runtime & Vesion Essential Select Runtime and Version - When Create New is selected
- Refer to the Runtime & Version list in Components > Runtime
- For the Java runtime, UI code editing is not supported, but you can import a JAR file from Object Storage and execute it
- When Start with Blueprint is selected
- You can view a source code example by clicking the View Source Code button for that Runtime & Version
- Refer to the Blueprint Detailed Guide for more information on Blueprint settings
- If the Runtime version has reached End of Technical Support (EoTS), it cannot be modified after creation
Table. Cloud Functions service information input fields- Start with a lowercase English letter and use lowercase English letters, numbers, and special characters (
Summary Check the detailed information and estimated charges generated in the panel, and click the Create button.
- When creation is complete, check the created resources on the Cloud Functions list page.
View Cloud Functions details
Cloud Functions Details page consists of Details, Monitoring, Logs, Code, Configuration, Triggers, Tags, Job History tabs.
To view detailed information about the Cloud Functions service, follow these steps.
- All Services > Compute > Cloud Functions Click the menu. 1. Navigate to the Service Home page of Cloud Functions.
- On the Service Home page, click the Function menu. 2. Function list Go to the page.
- On the Function list page, click the resource to view detailed information. 3. Navigate to the Function Details page.
- Function Details page displays status information and additional feature information, and consists of Details, Monitoring, Logs, Code, Configuration, Triggers, Tags, Job History tabs.
Category Detailed description Cloud Functions status Cloud Functions status information - Ready: green icon, a state where normal function invocations are possible
- Not Ready: gray icon, a state where normal function invocations are not possible
- Deploying: yellow icon, a state where the function is being created or updated, which triggers the next action
- Function creation and modification
- Code tab: edit code in the editor
- Code tab: inspect jar file
- Trigger tab: add and modify
- Configuration tab: modify
- Running: blue icon, a state where normal function invocations are possible and a cold‑start prevention policy is applied
Service cancellation Cancel service button Table. Cloud Functions status information and additional features
- Function Details page displays status information and additional feature information, and consists of Details, Monitoring, Logs, Code, Configuration, Triggers, Tags, Job History tabs.
Detailed Information
Function list page allows you to view detailed information of the selected resource and edit the information if needed.
| Category | Detailed description |
|---|---|
| service | Service name |
| Resource Type | Resource Type |
| SRN | Unique resource ID in Samsung Cloud Platform |
| Resource name | Resource name
|
| Resource ID | Service’s unique resource ID |
| Constructor | User who created the service |
| Creation date and time | Service creation timestamp |
| Modifier | User who modified the service |
| Modification date | Date and time of service modification |
| Function name | Name of the Cloud Function |
| Runtime | Runtime types and versions
|
- Even after technical support for the Runtime version ends, functions that have already been created can continue to be used without any call time limit. * However, security patches and updates for that Runtime version will not be applied.
- Bugs, errors, defects, or vulnerabilities that occur in Runtime versions that are no longer supported are not covered.
- If support for a Runtime has ended, the user must create a replacement Runtime version and then manually delete the function of the previous version.
- To use this function safely, create a new instance using the Lastest or Stable version.
Monitoring
Function List page lets you view the Cloud Functions usage information for the selected resource.
| Category | Detailed description |
|---|---|
| Number of calls | Average number of times the function is called per unit time (instances) |
| execution time | Average execution time (seconds) of the function per unit time |
| Memory usage | Average memory usage (KB) during the function execution per unit time |
| Current number of tasks | When the function is called multiple times simultaneously, the average number of tasks (count) generated per unit time for concurrent processing. |
| Successful call count | Average number of times (cases) the runtime code operated correctly and returned a response code per unit time during a function call. |
| Failed call count | Average number of calls with errors per unit time during function invocation
|
log
Function list page allows you to view the Cloud Functions logs of the selected resource.
| Category | Detailed description |
|---|---|
| unit period | Select the period to view Cloud Functions log information
|
| log message | Functions are displayed in order, starting with the most recent occurrence. |
code
Function List page lets you view and edit the Cloud Functions code of the selected resource.
The way to view and edit source code varies depending on the runtime used.
- Inline Editor: Node.js, Python, PHP, Go
- Compressed file (.jar/.zip) execution: Java
| Category | Detailed description |
|---|---|
| source code | Inline editor method |
| code information | Display code information |
| Edit | After clicking the Edit button, you can modify the code in the inline editor. |
| Category | Detailed description |
|---|---|
| source code | Execution method for compressed files (.jar/.zip) |
| code information | Display compressed file information
|
| Edit | Jar file can be modified
|
- If technical support for the runtime version has ended, you cannot modify the code. * Also, because security patches and updates are not applied, create and use the function anew with the Latest or Stable version to ensure safe usage.
- In the case of Java Runtime, it does not provide a UI code editing feature, and you must select a compressed file (.jar/.zip) from a bucket in the Object Storage service.
- If a user does not have an authentication key generated for the Object Storage service, they cannot execute Import from Object Storage, so they must create an authentication key in advance.
- For detailed information on creating an authentication key, see Creating an Authentication Key.
- The Object Storage bucket for the Cloud Functions service must have its access control set to allow.
- For detailed information on Object Storage access control, see Allowing Cloud Functions Service Access.
Configuration
On the Function list page, you can view the Cloud Functions configuration of the selected resource.
| Category | Detailed description |
|---|---|
| General configuration | Memory and timeout settings of Cloud Function
|
| function URL | Issue an HTTPS URL address that can access the function
|
| environment variable | Set runtime environment variables
|
| Private connection configuration | Can be used in conjunction with PrivateLink Service
|
| Permission | Add and manage resource policies for IAM-based functions
|
- If technical support for the Runtime version has been discontinued, configuration items cannot be modified. * Also, because security patches and updates are not applied, create and use the function anew with the Latest or Stable version to ensure safe usage.
- If access control is disabled, the registered access information is deleted, making function access control impossible, which can expose the system to security attacks such as external scanning, hacking, etc.
- CPU cores proportional to the memory allocation of General configuration are automatically assigned.
- If the minimum number of executions of General configuration is 1 or more, Cold Start is prevented, but continuous costs are incurred.
Trigger
On the Function List page, you can view and configure the trigger information of the selected resource. By setting a trigger, you can automatically execute the Function when an event occurs.
| Category | Detailed description |
|---|---|
| Cronjob | Use Cronjob as a trigger
|
| API Gateway | Use API Gateway as a trigger
|
- If technical support for the Runtime version has ended, you cannot modify the trigger item. * Also, because security patches and updates are not applied, create and use the function anew with the Latest or Stable version to ensure safe usage.
- If the Cronjob trigger is called before the function’s timeout, the function will execute concurrently, increasing both the execution count and the total time. * Therefore, be cautious because continuous additional costs can lead to high expenses.
- If the status is Deploying, it cannot be modified.
- Refer to Setting up triggers for trigger configuration.
Tag
In the Tag tab, you can view the resource’s tag information, and add, modify, or delete it.
| Category | Detailed description |
|---|---|
| Tag list | Tag list
|
Job History
Job History page allows you to view the resource’s job history.
| Category | Detailed description |
|---|---|
| Task History List | Resource Change History
|
Changing Java Runtime code
If you are using Java Runtime, you cannot modify the code directly, so you must select and replace the archive file (.jar/.zip) in the bucket of the Object Storage service.
To modify a compressed file, follow these steps.
All Services > Compute > Cloud Functions menu, click. 1. Navigate to the Service Home page of Cloud Functions.
On the Service Home page, click the Function menu. 2. Go to the Function list page.
On the Function List page, click the resource to change the compressed file in the code. 3. Go to the Function Details page.
Click the Edit button on the Code tab of the Function Details page. 4. Edit Function code Navigate to the page.
Click the Import from Object Storage button. 5. Import from Object Storage The popup window opens.
Category Detailed description Java Runtime Java Runtime Information Handler information Handler information - Execution Class: Automatically entered when setting the archive file (.jar/.zip)
- Execution Method: Automatically entered when setting the archive file (.jar/.zip)
Compressed file (.jar/.zip) Set the archive file to modify - Archive file name (.jar/.zip): Displays the name of the archive file. Import from Object Storage after configuration, it is entered automatically
- Import from Object Storage: Configure the Object Storage to retrieve the archive file (.jar/.zip)
Table. Cloud Functions Details - Function Code Modification ItemsEnter the URL information of the Object Storage to retrieve the compressed file in Object Storage URL, then click the Confirm button. 6. The notification popup opens.
- URL information can be found in the Folder List tab of the detailed page of the Object Storage to retrieve, under the File Information > Private URL item.
Click the Confirm button. 7. On the Function code edit page, the name of the imported compressed file is displayed in the Compressed file name (.jar/.zip).
Click the Save button.
- Users without a generated authentication key cannot execute Import from Object Storage.
- If the URL does not exist or the archive file matches any of the following, it cannot be changed.
- When using an unsupported file extension
- If there are harmful files inside the compressed file.
- If the size exceeds the supported limit
Terminate Cloud Functions
To cancel the Cloud Functions service, follow these steps.
- Click the All Services > Compute > Cloud Functions menu. 1. Navigate to the Service Home page of Cloud Functions.
- On the Service Home page, click the Function menu. 2. Navigate to the Function list page.
- On the Function List page, click the resource you want to terminate and then click the Terminate Service button.
- When the termination is complete, check on the Function list page whether the resource has been terminated.