diff --git a/localstack.go b/localstack.go index 50f854f24..13a4f5d33 100644 --- a/localstack.go +++ b/localstack.go @@ -218,6 +218,8 @@ var ( EC2 = Service{Name: "ec2", Port: "4597/tcp"} ES = Service{Name: "es", Port: "4578/tcp"} Firehose = Service{Name: "firehose", Port: "4573/tcp"} + // The port for batch is not correct + Batch = Service{Name: "batch", Port: "4593/tcp"} IAM = Service{Name: "iam", Port: "4593/tcp"} Kinesis = Service{Name: "kinesis", Port: "4568/tcp"} Lambda = Service{Name: "lambda", Port: "4574/tcp"} diff --git a/resolver.go b/resolver.go index b81ff40ae..dc429140b 100644 --- a/resolver.go +++ b/resolver.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/dynamodb" "github.com/aws/aws-sdk-go-v2/service/dynamodbstreams" "github.com/aws/aws-sdk-go-v2/service/ec2" + "github.com/aws/aws-sdk-go-v2/service/batch" "github.com/aws/aws-sdk-go-v2/service/elasticsearchservice" "github.com/aws/aws-sdk-go-v2/service/firehose" "github.com/aws/aws-sdk-go-v2/service/iam" @@ -55,6 +56,16 @@ func (c *CloudwatchResolverV2) ResolveEndpoint(_ context.Context, _ cloudwatch.E return resolveEndpoint(c.i.EndpointV2(CloudWatch)) } +// NewBatchResolver resolves the services ResolverV2 endpoint +func NewBatchResolverV2(i *Instance) *BatchResolverV2 { + return &BatchResolverV2{i: i} +} +type BatchResolverV2 struct{ i *Instance } + +func (b *BatchResolverV2) ResolveEndpoint(_ context.Context, _ batch.EndpointParameters) (smithyendpoints.Endpoint, error) { + return resolveEndpoint(b.i.EndpointV2(Batch)) +} + // NewCloudwatchLogsResolverV2 resolves the services ResolverV2 endpoint func NewCloudwatchLogsResolverV2(i *Instance) *CloudwatchLogsResolverV2 { return &CloudwatchLogsResolverV2{i: i}