Using S3 MRAP with presign url via CLI gets error for bucket name regex

0

We have 2 buckets:

projectassets-dev (us-east-1) projectsassets-dev-uk (eu-west-2)

We created a MRAP, added both buckets, enabled bidirectional replication, uploaded a picture of a cat. ie: cat.jpg

When we attempt to use the mrap via a presigned url, we get the following error:

aws s3 presign arn:aws:s3::1234567890:accesspoint/ourmrapalias.mrap/cat.jpg

Invalid bucket name "arn:aws:s3::1234567890:": Bucket name must match the regex "^[a-zA-Z0-9.-_]{1,255}$" or be an ARN matching the regex "^arn:(aws).:s3:[a-z-0-9]+:[0-9]{12}:accesspoint[/:][a-zA-Z0-9-]{1,63}$|^arn:(aws).:s3-outposts:[a-z-0-9]+:[0-9]{12}:outpost[/:][a-zA-Z0-9-]{1,63}[/:]accesspoint[/:][a-zA-Z0-9-]{1,63}$"

If I presign the bucket directly, it works fine. But it appears that MRAP doesnt like s3 buckets with dashes in their names? I created another bucket without them and it works fine, only problem is our application is already existing and I cant really just rename/move bucket names easily.

I've followed the documentation here for CLI presign url's.

AmpsDES
已提問 10 個月前檢視次數 484 次
1 個回答
0

Try using the access point alias instead of the ARN.

profile pictureAWS
專家
kentrad
已回答 10 個月前
  • using just the alias results in the following:

    aws s3 presign ourmrapalias.mrap/cat.jpg

    a presigned URL is generated with token. however when you attempt to use it, you get the following error:

    <Error> <Code>NoSuchBucket</Code> <Message>The specified bucket does not exist</Message> <BucketName>ourmrapalias.mrap</BucketName> <RequestId>1M9A26S729NNWHMC</RequestId> <HostId>mvyvYDyJTVb5DRtxxOz2NXDxvFgEoQ8nmqzhwajKvEnooAAIHj9laZSS3Na8p/kOhGyO/zhPvfg=</HostId> </Error>

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南