The AWS S3 connector in Workflows has a built-in Upload Object action card that supports uploading files to an S3 bucket. The object to be uploaded must be of type File, meaning the file must exist in the Workflows platform file system as described here: Working with Files in Okta Workflows.
There may be scenarios where there is a need to upload text that does not exist as a file in the workflows file system. For example, the text may generated as output from another card in the workflow. To accomplish this, the AWS S3 connector Custom API Action card can be used.
- Okta Workflows
- AWS S3 connector
- Custom API Action card
The following screenshot is an example workflow that illustrates how to upload text to an AWS S3 bucket:
NOTE:
- The Okta Connector Custom API Action card retrieves the JSON text representation of an application in Okta. In the card Options, the Request Type is set to GET.
- The JSON Stringify card is used to convert the Body output of the request to a JSON string that will be uploaded to S3.
- The AWS S3 connector Custom API Action card is used to upload the JSON string to an S3 bucket.
- In the card Options, the Request Type is set to PUT, and the AWS region must be selected from the Region drop-down list.
- The Bucket and Relative URL must be specified. The Bucket name can also be included in the URL rather than using the Bucket input, for example:
/oktabucket/myFolder/myApp.json. - The appJSON output from the Stringify card is mapped to the Body input of the request.
