

# Function packages for AWS TNB
<a name="function-packages"></a>

A function package is a .zip file in CSAR (Cloud Service Archive) format that contains a network function (an ETSI standard telecommunication application) and function package descriptor that uses the TOSCA standard to describe how the network functions should run on your network.

**Topics**
+ [

# Create a function package in AWS TNB
](create-function-package.md)
+ [

# View a function package in AWS TNB
](view-function-package.md)
+ [

# Download a function package from AWS TNB
](download-function-package.md)
+ [

# Delete a function package from AWS TNB
](delete-function-package.md)

# Create a function package in AWS TNB
<a name="create-function-package"></a>

Learn how to create a function package in the AWS TNB network functions catalog. Creating a function package is the first step for creating a network in AWS TNB. After you've uploaded a function package, you can create a network package.

------
#### [ Console ]

**To create a function package using the console**

1. Open the AWS TNB console at [https://console.aws.amazon.com/tnb/](https://console.aws.amazon.com/tnb/).

1. In the navigation pane, choose **Function packages**.

1. Choose **Create function package**.

1. Choose **Choose files** and upload each CSAR package as a `.zip` file. You can upload a maximum of 10 files.

1. Choose **Next**.

1. Review the package details.

1. Choose **Create function package**.

------
#### [ AWS CLI ]

**To create a function package using the AWS CLI**

1. Use the [create-sol-function-package](https://docs.aws.amazon.com/cli/latest/reference/tnb/create-sol-function-package.html) command to create a new function package:

   ```
   aws tnb create-sol-function-package
   ```

1. Use the [put-sol-function-package-content](https://docs.aws.amazon.com/cli/latest/reference/tnb/put-sol-function-package-content.html) command to upload the function package content. For example:

   ```
   aws tnb put-sol-function-package-content \
   --vnf-pkg-id ^fp-[a-f0-9]{17}$ \
   --content-type application/zip \
   --file "fileb://valid-free5gc-udr.zip" \
   --endpoint-url "https://tnb.us-west-2.amazonaws.com" \
   --region us-west-2
   ```

------

# View a function package in AWS TNB
<a name="view-function-package"></a>

Learn how to view the content of a function package.

------
#### [ Console ]

**To view a function package using the console**

1. Open the AWS TNB console at [https://console.aws.amazon.com/tnb/](https://console.aws.amazon.com/tnb/).

1. In the navigation pane, choose **Function packages**.

1. Use search box to find the function package

------
#### [ AWS CLI ]

**To view a function package using the AWS CLI**

1. Use the [list-sol-function-packages](https://docs.aws.amazon.com/cli/latest/reference/tnb/list-sol-function-packages.html) command to list your function packages.

   ```
   aws tnb list-sol-function-packages
   ```

1. Use the [get-sol-function-package](https://docs.aws.amazon.com/cli/latest/reference/tnb/get-sol-function-package.html) command to view details about a function package.

   ```
   aws tnb get-sol-function-package \
   --vnf-pkg-id ^fp-[a-f0-9]{17}$ \
   --endpoint-url "https://tnb.us-west-2.amazonaws.com" \
   --region us-west-2
   ```

------

# Download a function package from AWS TNB
<a name="download-function-package"></a>

Learn how to download a function package from the AWS TNB network functions catalog.

------
#### [ Console ]

**To download a function package using the console**

1. Open the AWS TNB console at [https://console.aws.amazon.com/tnb/](https://console.aws.amazon.com/tnb/).

1. In the navigation pane on the left side of the console, choose **Function packages**.

1. Use search box to find the function package

1. Choose the function package

1. Choose **Actions**, **Download**.

------
#### [ AWS CLI ]

**To download a function package using the AWS CLI**  
Use the [get-sol-function-package-content](https://docs.aws.amazon.com/cli/latest/reference/tnb/get-sol-function-package-content.html) command to download a function package.

```
aws tnb get-sol-function-package-content \
--vnf-pkg-id ^fp-[a-f0-9]{17}$ \
--accept "application/zip" \
--endpoint-url "https://tnb.us-west-2.amazonaws.com" \
--region us-west-2
```

------

# Delete a function package from AWS TNB
<a name="delete-function-package"></a>

Learn how to delete a function package from the AWS TNB network functions catalog. To delete a function package, the package must be in a disabled state.

------
#### [ Console ]

**To delete a function package using the console**

1. Open the AWS TNB console at [https://console.aws.amazon.com/tnb/](https://console.aws.amazon.com/tnb/).

1. In the navigation pane, choose **Function packages**.

1. Use the search box to find the function package.

1. Choose a function package.

1. Choose **Actions**, **Disable**.

1. Choose **Actions**, **Delete**.

------
#### [ AWS CLI ]

**To delete a function package using the AWS CLI**

1. Use the [update-sol-function-package](https://docs.aws.amazon.com/cli/latest/reference/tnb/update-sol-function-package.html) command to disable a function package.

   ```
   aws tnb update-sol-function-package --vnf-pkg-id ^fp-[a-f0-9]{17}$ ---operational-state DISABLED
   ```

1. Use the [delete-sol-function-package](https://docs.aws.amazon.com/cli/latest/reference/tnb/delete-sol-function-package.html) command to delete a function package.

   ```
   aws tnb delete-sol-function-package \
   --vnf-pkg-id ^fp-[a-f0-9]{17}$ \
   --endpoint-url "https://tnb.us-west-2.amazonaws.com" \
   --region us-west-2
   ```

------