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

0

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?

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

https://docs.amplify.aws/javascript/tools/libraries/configure-categories/#storage-amazon-s3

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 回答
0

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 } } };

Amplify.configure(awsConfig);

profile picture
Jagan
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则