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.

1 Answer
0

Try using the access point alias instead of the ARN.

profile pictureAWS
EXPERT
kentrad
answered 10 months ago
  • 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>

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions