Why is it not possible to not upload files in AWS S3 Bucket in Orchestrator?
Issue Description
After configuring the AWS S3 bucket under the Storage Buckets in Orchestrator and trying to upload files into the same, the following error is thrown in Orchestrator - "Could not connect to the server (#101)".
Root Cause
- This is a CORS issue. CORS is a mechanism that allows resources on a web page to be accessed across domain boundaries.
- The Orchestrator web browser access to Amazon and Azure storage buckets can be restricted due to the same-origin policy on the provider side. Successfully accessing the content of such a bucket from the Orchestrator UI requires configuring the respective provider to allow cross-origin requests from the Orchestrator.
Resolution
- Set the same CORS rule in the AWS S3 Bucket Configuration.
"CORSConfiguration": {
"CORSRule": [
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"http://*.uipath.com"
],
"MaxAgeSeconds": 3000
}
]
- So basically, add the following in the CORS rule.
"AllowedOrigins": [
"http://*.uipath.com"
],
TO
"AllowedOrigins": [
"https://*.uipath.com"
]
- To configure a bucket to allow cross-origin requests, create a CORS configuration. The CORS configuration is a document with rules that identify the origins that allow to access the bucket, the operations (HTTP methods) that will support each origin, and other operation-specific information. Add up to 100 rules to the configuration. Also, add the CORS configuration as the CORS subresource to the bucket.
- If configuring CORS in the S3 console, use JSON to create a CORS configuration. The new S3 console only supports JSON CORS configurations.
- Note: It is required to follow the HTTPS Request.
- Permissions summary:
| Permission Name | Description |
|---|---|
| Create | Storage Buckets - allows the creation of new storage buckets. Storage Files- allows the creation of new files in storage buckets. |
| Edit | Storage Buckets- allows the editing of existing storage buckets. |
| View | Storage Buckets- allows access to bucket contents. Required for any file operations within buckets. Storage Files- enables browsing and downloading of bucket contents. |
| Delete | Storage Buckets- allows the deletion of existing storage buckets. Storage Files- allows the deletion of files in storage buckets. |
Read more here: