How to upload files to S3 using an Multi-Region Access Point in Amplify-js


I have created a Multi-Region Access Point using AWS SAM, then I have an angular application with Cognito as identity provider that uses the amplify-js library. I want to upload and download files to s3 from the angular app using the MRAP endpoint, is it possible to work as below?

  Storage: {
    S3: {
      bucket: 'arn:aws:s3::<Account-ID>:accesspoint/<MY_MRAP_ID>.mrap)', 
      region: 'us-east-1' 

Any ideas to make it work using another approach? The amplify-js uses temporary credentials from the Authenticated role from Cognito user that login in the app.

1 réponse

you can try to this const awsConfig = { // ... other configurations ... Storage: { AWSS3: { bucket: 'your-bucket-name', // Your bucket name region: 'your-region', // The region of your bucket accessPointArn: 'your-multi-region-access-point-arn', // Your Multi-Region Access Point ARN } } };


profile picture
répondu il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions