Closed AdonousTech closed 3 years ago
Hi @AdonousTech 👋 Thanks for raising this issue. What version are you upgrading from and how are you importing and using the Storage module? This is only affecting your PUT requests whereas GET is still working as expected for you?
@chrisbonifacio - thanks for getting back on this. I am upgrading from "aws-amplify": "^1.3.3"
I am upgrading as part of a larger upgrade from Angular v9 => 12. Consequently, I need to use the latest versions with the bifurcated packages (e.g. core, auth, storage, etc.).
@AdonousTech After speaking with the team, this isn't technically possible or how S3 works. S3 stores files as Objects with the "path" to the file as a key to access them. It may seem like there are folders in the S3 console but that's just how it visually organizes the files.
Here's a link to the documentation for more information.
This is particularly relevant
The Amazon S3 data model is a flat structure: You create a bucket, and the bucket store objects. There is no hierarchy of subbuckets or subfolders. However, you can infer logical hierarchy using key name prefixes and delimiters as the Amazon S3 console does. The Amazon S3 console supports a concept of folders.
If you really need to create or display an "empty folder" for your UI you may try a workaround similar to this:
Upload a file on the top-level named "emptyfolders.txt" with all the paths, so you can render the "empty directory" in your UI
Once a file has been added, use a Lambda trigger to validate that and remove the line from the emptyfolders.txt
@chrisbonifacio Yes, I read that as well. Somehow I was able to get a hack working prior to the amplify update. I've been doing this in production for a couple of years, with no issues.
Good to know this is not a systemic issue and related only to creating empty "directories". Although, it would be helpful to have a more accurate error message.
I will look into the suggestions above. Thanks for your help, I really appreciate it!
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
This is the same issue as described here, except I am using Angular instead of React https://github.com/aws-amplify/amplify-js/issues/8783
JavaScript Framework
Angular
Amplify APIs
Authentication, Storage
Amplify Categories
auth, storage
Environment information
Describe the bug
After upgrading to the latest version of amplify storage (@aws-amplify/storage) I receive a
SignatureDoesNotMatch
error when attempting to 1) create a new folder in S3, or 2) upload a file using the existing amplify-storage APIs.Note that I never had this issue until upgrading
I checked and my system date/time is configured correctly
All referenced env vars are pulling the correct values (this all worked before the package update)
Here is my amplify configuration:
main.ts
file:Expected behavior
Reproduction steps
Code Snippet
Log output
SignatureDoesNotMatch
aws-exports.js
Manual configuration
Additional configuration
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response