v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1435190156.6 KB

Creates a presigned URL for an S3 POST operation to upload a file. You can use this URL to set a default file for a FileUploadCard in a Q App definition or to provide a file for a single Q App run. The scope parameter determines how the file will be used, either at the app definition level or the app session level.

The IAM permissions are derived from the qapps:ImportDocument action. For more information on the IAM policy for Amazon Q Apps, see IAM permissions for using Amazon Q Apps.

post/apps.createPresignedUrl#instance-id

Headers

instance-idstring required

The unique identifier of the Amazon Q Business application environment instance.

Request body

cardIdstring required

The unique identifier of the card the file is associated with.

appIdstring required

The unique identifier of the Q App the file is associated with.

fileContentsSha256string required

The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.

fileNamestring required

The name of the file to be uploaded.

scope'APPLICATION' | 'SESSION' required

Whether the file is associated with a Q App definition or a specific Q App session.

sessionIdstring

The unique identifier of the Q App session the file is associated with, if applicable.

Response

Success

fileIdstring required

The unique identifier assigned to the file to be uploaded.

presignedUrlstring required

The URL for a presigned S3 POST operation used to upload a file.

presignedUrlFieldsobject required

The form fields to include in the presigned S3 POST operation used to upload a file.

presignedUrlExpirationstring date-time required

The date and time that the presigned URL will expire in ISO 8601 format.