This endpoint allows you to update an existing AWS S3 private connection. You can modify the connection name, description, or enable/disable the connection without changing the AWS account ID or region.
You need a valid API key to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.
Important: You cannot change the AWS Account ID or AWS Region of an existing connection. If you need to change these values, create a new connection instead.
The current version number of the connection (for optimistic locking). This prevents concurrent updates from overwriting each other. Get the current version from the Get Connection by ID endpoint.Example:1
Returns the updated AWS connection object. The version number is incremented with each successful update. Note that awsAccountId, awsRegion, and connectionId cannot be changed.
// Update connection name for better organization// First, get the current connection to retrieve the versionconst connection = await getAwsConnectionById(apiKey, connectionId);const updates = { name: 'Production-S3-Connection', description: 'Production environment AWS S3 assets', enabled: true, version: connection.version};const result = await updateAwsConnection(apiKey, connectionId, updates);console.log(`Connection renamed to: ${result.name}`);
# Disable connection without deleting it# First, get the current connection to retrieve the versionconnection = get_aws_connection_by_id(api_key, connection_id)updates = { "name": "PictoryPrivateVideosConnection", "description": "Pictory Private Videos Connection", "enabled": False, # Disable the connection "version": connection["version"]}result = update_aws_connection(api_key, connection_id, updates)print(f"Connection is now {'enabled' if result['enabled'] else 'disabled'}")
# Update just the description, keep other fields unchanged# First get the current connection detailscurrent = get_aws_connection_by_id(api_key, connection_id)# Update with new descriptionupdates = { "name": current["name"], # Keep existing name "description": "Updated description with new information", "enabled": current["enabled"], # Keep existing enabled state "version": current["version"] # Include current version for optimistic locking}result = update_aws_connection(api_key, connection_id, updates)print(f"Description updated: {result['description']}")
Cannot Change AWS CredentialsYou cannot update the awsAccountId or awsRegion of an existing connection. These values are set when the connection is created and cannot be modified. Do NOT include these fields in your update request.What happens if you try:
Including awsRegion in the request body will cause a 400 Bad Request error
Including awsAccountId in the request body will cause a 400 Bad Request error
The connectionId is in the URL path and cannot be changed
Version TrackingEach successful update increments the version number of the connection. This helps track configuration changes over time.
Disabling vs DeletingInstead of deleting a connection you may need later, consider temporarily disabling it by setting enabled: false. This preserves the configuration while preventing its use in video creation.