Can anyone point me in the right direction to more information about how to use the ModelTodoFilterInput
? @dantasfiles provided some links to Query and Scan, but I wasn't able to put it together.
What I have is a Storage.list -operation that returns an array of 5 object. Each of these has a key-value pair. I would like to filter the response, so that I only get the 4 objects where the value partially matches a given string.
Eg.
// Given string: "filename1"
{
key: "path/filename1.jpg" // match
...
key: "path/filename2.jpg" // no match
...
key: "path2/filename1.jpg" // match
}
Expected response:
{
key: "path/filename1.jpg",
key: "path2/filename1.jpg"
}
amplify publish
as you have no frontend to publish to s3. So you should be using amplify push
to deploy your backend.
Hi everyone, I'm building a webapp with Amplify and I need a bucket with multiple folders.
Each folder must be accessible only by a specific Cognito group.
For example
Mybucket/firstClient
Mybucket/secondClient
And I have firstClient and secondClient cognito groups with multiple users inside.
Is there a way to model such a policy? Or is there another way to accomplish this?
/private/${cognito-identity.amazonaws.com:sub}/
could be ok, but I forgot to mention that the cognito admin group must be able to write in both of those "folders".I have the documentation schema.graphql
type Customer @model @key(fields: ["email"]) {
email: String!
username: String
}
I run amplify mock api
and run the mutation
createCustomer(input: {email: "bob@bob.com", username: "bob"}) {
email
username
}
I get the result:
Error while executing Local DynamoDB
...
ValidationException: One of the required keys was not given a value
amplify mock api
gets confused if you change tables and keys too often, I had to manually delete the mock dynamodb table file and let amplify mock api
rebuild a new one
in the example from the GraphQL transform documentation:
type Customer @model
@key(name: "byRepresentative", fields: ["accountRepresentativeID", "id"], queryField: "byRepresentative") {
id: ID!
accountRepresentativeID: ID!
...
}
Is there any difference between that and this different GSI (with no sort key "id")?
type Customer @model
@key(name: "byRepresentative", fields: ["accountRepresentativeID"], queryField: "byRepresentative") {
id: ID!
accountRepresentativeID: ID!
...
}
@key
directive
accountRepresentativeID
alone would be fine for that use case