The CURL request:
curl --location --request PUT '<<url provided by previous request>>' \ --header 'Content-Type: application/pdf' \ --data '@<<path to file>>'
Request sample:
curl --location --request PUT 'https://das-upload-eu-central-1-329803703153.s3.eu-central-1.amazonaws.com/das-ib-pct1/ed48ce28-411a-491c-a689-4a37205bff7c.zip?Content-Type=application%2Fzip&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAUZSOVENYROF7PMYZ%2F20230328%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20230328T110306Z&X-Amz-Expires=900&X-Amz-Security-Token=FwoGZXIvYXdzEHwaDGB5U2%2B8sX4HuoZr3CLAAW20HvKRfPho84MtwljMA%2FLLF3hBtCHbLm0IFlakEZDUBiCPFkDZEzOnbPLeDSKqa6y003SAmQkLYPlWyP8HLS5j9ulMp6p%2F0U%2B4gdqyHIJdnf5V2b9iygJ4ez%2BddBjSB0vKBPoPWAtjCJtis%2ByMdFBwBNZWuOaAgC7PUhz2wvWhY4EpxmKjfEeGZhK04nqJXLevPaSNyFszettycftKYXKYYE4hynxP9tdtfaSiCRk4cyccz9EoAlB3UtefhcyGSijqkouhBjIt9%2BX%2BrzsG0yIdKa%2BpEodLwR0Tj7JoO%2BxKh%2BtLdHQpLBHzk%2FP6XfqfwVl35tlL&X-Amz-Signature=1504d3288c52bc98e39ea61e9206ec37a026a7550ce0ee0b587a8adf27da53d3&X-Amz-SignedHeaders=host' \ --header 'Content-Type: application/pdf' \ --data '@/home/berlicki/Downloads/demo/PCT-IB2022-057316.pdf'
Expected response:
If the PUT went well, you'll not get any (error) response, otherwise, you can get an error like this:
<?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Request has expired</Message><X-Amz-Expires>900</X-Amz-Expires><Expires>2023-03-28T11:18:06Z</Expires><ServerTime>2023-03-28T11:51:57Z</ServerTime><RequestId>QRMREFH2ZS0MBF60</RequestId><HostId>EuHLJQnIRJXpvVWOaPy1d21H6pmngN5kxpJBxJTrKLW9V6lZ9PwhAhaYScIhz6s/2n1RSLgTixlAvploAdcJtw==</HostId></Error>