@@ -397,25 +397,6 @@ func TestEndpointWithARN(t *testing.T) {
397397 expectedSigningName : "custom-sign-name" ,
398398 expectedSigningRegion : "us-west-2" ,
399399 },
400- "Outpost AccessPoint with no S3UseARNRegion flag set" : {
401- bucket : "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
402- options : s3.Options {
403- Region : "us-west-2" ,
404- },
405- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com/testkey?x-id=GetObject" ,
406- expectedSigningName : "s3-outposts" ,
407- expectedSigningRegion : "us-west-2" ,
408- },
409- "Outpost AccessPoint Cross-Region Enabled" : {
410- bucket : "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
411- options : s3.Options {
412- Region : "us-west-2" ,
413- UseARNRegion : true ,
414- },
415- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com/testkey?x-id=GetObject" ,
416- expectedSigningName : "s3-outposts" ,
417- expectedSigningRegion : "us-east-1" ,
418- },
419400 "Outpost AccessPoint Cross-Region Disabled" : {
420401 bucket : "arn:aws:s3-outposts:us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
421402 options : s3.Options {
@@ -431,60 +412,6 @@ func TestEndpointWithARN(t *testing.T) {
431412 },
432413 expectedErr : "Client was configured for partition `aws` but ARN (`arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint`) has `aws-cn`" ,
433414 },
434- "Outpost AccessPoint cn partition" : {
435- bucket : "arn:aws-cn:s3-outposts:cn-north-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
436- options : s3.Options {
437- Region : "cn-north-1" ,
438- },
439- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.cn-north-1.amazonaws.com.cn/testkey?x-id=GetObject" ,
440- expectedSigningName : "s3-outposts" ,
441- expectedSigningRegion : "cn-north-1" ,
442- },
443- "Outpost AccessPoint Custom Endpoint Source" : {
444- bucket : "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
445- options : s3.Options {
446- Region : "us-west-2" ,
447- EndpointResolver : EndpointResolverFunc (func (region string , options s3.EndpointResolverOptions ) (aws.Endpoint , error ) {
448- return aws.Endpoint {
449- URL : "https://my-domain.com" ,
450- Source : aws .EndpointSourceCustom ,
451- SigningName : "custom-sign-name" ,
452- SigningRegion : region ,
453- }, nil
454- }),
455- },
456- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.my-domain.com/testkey?x-id=GetObject" ,
457- expectedSigningName : "custom-sign-name" ,
458- expectedSigningRegion : "us-west-2" ,
459- },
460- "Outpost AccessPoint Custom Endpoint Source Immutable" : {
461- bucket : "arn:aws:s3-outposts:us-west-2:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
462- options : s3.Options {
463- Region : "us-west-2" ,
464- EndpointResolver : EndpointResolverFunc (func (region string , options s3.EndpointResolverOptions ) (aws.Endpoint , error ) {
465- return aws.Endpoint {
466- URL : "https://myaccesspoint-123456789012.op-01234567890123456.my-domain.com" ,
467- Source : aws .EndpointSourceCustom ,
468- SigningName : "custom-sign-name" ,
469- SigningRegion : region ,
470- HostnameImmutable : true ,
471- }, nil
472- }),
473- },
474- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.my-domain.com/testkey?x-id=GetObject" ,
475- expectedSigningName : "custom-sign-name" ,
476- expectedSigningRegion : "us-west-2" ,
477- },
478- "Outpost AccessPoint us-gov region" : {
479- bucket : "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
480- options : s3.Options {
481- Region : "us-gov-east-1" ,
482- UseARNRegion : true ,
483- },
484- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-gov-east-1.amazonaws.com/testkey?x-id=GetObject" ,
485- expectedSigningName : "s3-outposts" ,
486- expectedSigningRegion : "us-gov-east-1" ,
487- },
488415 "Outpost AccessPoint FIPS cross-region" : {
489416 bucket : "arn:aws-us-gov:s3-outposts:us-gov-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
490417 options : s3.Options {
@@ -906,26 +833,6 @@ func TestEndpointWithARN(t *testing.T) {
906833 expectedSigningName : "s3" ,
907834 expectedSigningRegion : "us-east-1-fips" ,
908835 },
909- "Invalid Outpost AccessPoint ARN with FIPS pseudo-region (prefix)" : {
910- bucket : "arn:aws:s3-outposts:fips-us-east-1:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
911- options : s3.Options {
912- Region : "us-west-2" ,
913- UseARNRegion : true ,
914- },
915- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.fips-us-east-1.amazonaws.com/testkey?x-id=GetObject" ,
916- expectedSigningName : "s3-outposts" ,
917- expectedSigningRegion : "fips-us-east-1" ,
918- },
919- "Invalid Outpost AccessPoint ARN with FIPS pseudo-region (suffix)" : {
920- bucket : "arn:aws:s3-outposts:us-east-1-fips:123456789012:outpost:op-01234567890123456:accesspoint:myaccesspoint" ,
921- options : s3.Options {
922- Region : "us-west-2" ,
923- UseARNRegion : true ,
924- },
925- expectedReqURL : "https://myaccesspoint-123456789012.op-01234567890123456.s3-outposts.us-east-1-fips.amazonaws.com/testkey?x-id=GetObject" ,
926- expectedSigningName : "s3-outposts" ,
927- expectedSigningRegion : "us-east-1-fips" ,
928- },
929836 "Invalid Object Lambda ARN with FIPS pseudo-region (prefix)" : {
930837 bucket : "arn:aws:s3-object-lambda:fips-us-east-1:123456789012:accesspoint/myap" ,
931838 options : s3.Options {
0 commit comments