I am getting StorageErrors for both upload and list.
Error: StorageError: Received HTTP Response status code 403 Forbidden Recovery suggestion: Make sure the user has access to the key before trying to download/upload it.
I created a new iOS test app with Storage accessible to guests. But upload and list are throwing errors.
export const storage = defineStorage({ name: 'ampSampleDrive', access: (allow) => ({ 'test/*': [ allow.guest.to(['read', 'write']), ] }) });
` func upload() async throws {
let dataString = "My Data"
let data = Data(dataString.utf8)
let uploadTask = Amplify.Storage.uploadData(
key: "test/\(UUID().uuidString)",
data: data
)
let value = try await uploadTask.value
print("Completed: \(value)")
}`