Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Nick Bagley
    @timeconsumer_gitlab
    Anyone else ever run into an issue where the amplify build when hooked into a git repo overwrites the environment variables specified in PreSignup, CustomMessage, ...etc lambdas on the build?
    Kristine Olberg
    @krisolberg_gitlab
    Does the Amplify custom auth challenge support reCAPTCHA version 3? It wouldn't seem to since the documentation says, "VerifyAuthChallengeResponse will run when the Auth.sendCustomChallenge function is called with the data that is returned when the user interacts with the Google reCaptcha component." With reCAPTCHA version 3 there is no explicit user interaction with the component--it works behind the scenes. But am I missing something?
    eliasericsson
    @eliasericsson

    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"
    }
    @dantasfiles That's acceptable for my use case, thanks!
    eliasericsson
    @eliasericsson

    @dantasfiles

    onDelete(mykey) {
            console.log(mykey)
            Storage.list('', {
                level: 'protected',
                key: {contains: mykey}
            }).then( res => console.log(res) );
    }

    Still I get 5 in return when I expect 4. Just console.log(mykey) gives the expected string

    I'll have a look at mock api
    @dantasfiles I'm still very grateful!
    eliasericsson
    @eliasericsson
    @dantasfiles I think the error is on my part. I keep mixing up API and Storage
    Daniel S. Dantas
    @dantasfiles
    @eliasericsson storage.list returns a list of keys, right? so can you run something like res.filter(({key}) => key.match(regex)
    Ranjith Ramesh
    @ranjith8593
    I am following amplify javascript to build react native app
    i ran amplify init
    amplify publish is failing saying that npm build script is not present
    I exactly followed the same steps here . should we add any build script to package,json file
    Jeff Finley
    @quickliketurtle
    When you run amplify init you are asked for a build command, the default is npm run-script build, but when using expo to create the app, there is not an npm script called ‘build’. So it sounds like that is the issue.
    Since you are creating a react native app, you shouldn’t need to use amplify publish as you have no frontend to publish to s3. So you should be using amplify push to deploy your backend.
    Ranjith Ramesh
    @ranjith8593
    Great. Thanks
    Jun
    @Jun711
    @quickliketurtle I figured out the problem> it seems that it is a npm package manager issue that I had multiple copies of aws-amplify/auth in node_modules. I fixed it based on the steps listed here https://github.com/aws-amplify/amplify-js/issues/2098#issuecomment-439627717
    Jeff Finley
    @quickliketurtle
    Nice, glad you got it figured out.
    Kros21
    @Kros21
    How are you?
    I have some questions now
    When using aws-amplify, I am getting the following error.
    "ProtoType value can only be an object or null"
    Please help me, thanks
    Wouter van den Broek
    @wbroek
    @rathoregee if you call Auth on Amplify Auth it should do the redirect, thats what the button also does in my opinion
    Kros21
    @Kros21
    Thanks.
    May I ask detailed content about this issue?
    If needed, I can share my code.
    Gino-Casolaro
    @Gino-Casolaro
    How would one implement handlebars with amplify can't seem to get it to load with .hbs files
    Riccardo Sirigu
    @ricsirigu

    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?

    Erich L Timkar
    @erich-team
    S3 doesn’t actually have folders. It may look like it in the web interface, but they don't . S3 just kindly translate any “/“ in the object keys as folders in the interface. It’s purely a display consideration.
    Depending on the scenario, it might conceivably be possible to simulate something like it, but it seems like it would be a reallly difficult, would involve custom policies and maybe tags, and could likely be brittle.
    Jeff Finley
    @quickliketurtle
    @ricsirigu Have you looked at Amplify Storage? that creates a few levels of folders (prefixes) and permissions. Including how you could use a users cognito identify to allow access. It doesn’t solve you specific ask directly, but will give you an idea of how to do this.
    Erich L Timkar
    @erich-team
    Now, if didn’t only wanted to query S3 and return to firstClient the objects in "Mybucket/firstClient", but not actually formally restrict, you could filter by key.
    Yeah, what Jeff said. :)
    A decidedly more helpful anwer.
    Jeff Finley
    @quickliketurtle
    :-)
    Riccardo Sirigu
    @ricsirigu
    Yes @quickliketurtle , the private storage that amplify creates with the prefix /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".
    And I don't know how to model those requirements with a policy. Or am I overcomplicating things?
    Daniel S. Dantas
    @dantasfiles

    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
    ah, 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
    Patrick Harding
    @senorpatricio
    @BrandonShega did you get it figured out? we use SAML with Okta in our application.
    Daniel S. Dantas
    @dantasfiles

    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!
      ...
    }
    I'm trying to understand the details of the @key directive
    Gino-Casolaro
    @Gino-Casolaro
    Hey guys so I've been trying to get my web application up on Amplify-Cli but can't get it to render properly. I'm using handlebars and all of my files are .hbs files. Meaning when it asks for the main file (usually index.html) I instead try index.hbs but this doesn't render at all. Am I doing something wrong or is this not possible with hbs files?
    Daniel S. Dantas
    @dantasfiles
    so from this blog post, particularly the Find all songs for a SingerId example, it looks like the 2nd gsi with field accountRepresentativeID alone would be fine for that use case
    Wouter van den Broek
    @wbroek
    @Gino-Casolaro Maybe look at the redirects section in Amplify CLI There you can alter the behavoir of what files/extensions do/go to
    Amir Hajimirsadeghi
    @amirhajimirsadeghi
    Has anybody successfully set up aws amplify function with babel? Would love to look through an example
    Amir Hajimirsadeghi
    @amirhajimirsadeghi
    Or more specifically, has anybody successfully deployed a typescript express lambda?
    Alex T.
    @alexdev888
    Is anybody test aws-amplify-angular with angular 9?
    is it working?
    Armon Raphiel
    @araphiel
    Hey good people, can anyone help answer questions about team IAM access?
    1. Does the Amplify Console require specific IAM actions?
    2. What is the best practice for allowing team CLI usage in a restricted environment?
      For example, can this list of IAM settings for CLI be restricted to things created by this IAM group