Skip to content

Commit

Permalink
Merge pull request #37980 from prince310501/b-aws_lambda_event_source…
Browse files Browse the repository at this point in the history
…_mapping

Increase limit for maximum concurrent executions beyond 1000
  • Loading branch information
ewbankkit committed Jun 18, 2024
2 parents 0a9c5af + 3038ea9 commit b257779
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/37980.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_lambda_event_source_mapping: Remove the upper limit on `scaling_config.maximum_concurrency`
```
2 changes: 1 addition & 1 deletion internal/service/lambda/event_source_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func resourceEventSourceMapping() *schema.Resource {
"maximum_concurrency": {
Type: schema.TypeInt,
Optional: true,
ValidateFunc: validation.IntBetween(2, 1000),
ValidateFunc: validation.IntAtLeast(2),
},
},
},
Expand Down
50 changes: 50 additions & 0 deletions names/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package names
import (
"fmt"
"log"
"slices"
"strings"

"github.com/hashicorp/terraform-provider-aws/names/data"
Expand Down Expand Up @@ -170,8 +171,55 @@ const (

// AWS ISOB (US) partition's regions.
USISOBEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio).

// AWS ISOF partition's regions.
EUISOEWest1RegionID = "eu-isoe-west-1" // EU ISOE West.
)

var allRegionIDs = []string{
AFSouth1RegionID,
APEast1RegionID,
APNortheast1RegionID,
APNortheast2RegionID,
APNortheast3RegionID,
APSouth1RegionID,
APSouth2RegionID,
APSoutheast1RegionID,
APSoutheast2RegionID,
APSoutheast3RegionID,
APSoutheast4RegionID,
CACentral1RegionID,
CAWest1RegionID,
EUCentral1RegionID,
EUCentral2RegionID,
EUNorth1RegionID,
EUSouth1RegionID,
EUSouth2RegionID,
EUWest1RegionID,
EUWest2RegionID,
EUWest3RegionID,
ILCentral1RegionID,
MECentral1RegionID,
MESouth1RegionID,
SAEast1RegionID,
USEast1RegionID,
USEast2RegionID,
USWest1RegionID,
USWest2RegionID,
CNNorth1RegionID,
CNNorthwest1RegionID,
USGovEast1RegionID,
USGovWest1RegionID,
USISOEast1RegionID,
USISOWest1RegionID,
USISOBEast1RegionID,
EUISOEWest1RegionID,
}

func Regions() []string {
return slices.Clone(allRegionIDs)
}

func DNSSuffixForPartition(partition string) string {
switch partition {
case "":
Expand Down Expand Up @@ -218,6 +266,8 @@ func PartitionForRegion(region string) string {
return ISOPartitionID
case USISOBEast1RegionID:
return ISOBPartitionID
case EUISOEWest1RegionID:
return ISOEPartitionID
case USGovEast1RegionID, USGovWest1RegionID:
return USGovCloudPartitionID
default:
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/lambda_event_source_mapping.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ resource "aws_lambda_event_source_mapping" "example" {

### scaling_config Configuration Block

* `maximum_concurrency` - (Optional) Limits the number of concurrent instances that the Amazon SQS event source can invoke. Must be between `2` and `1000`. See [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency).
* `maximum_concurrency` - (Optional) Limits the number of concurrent instances that the Amazon SQS event source can invoke. Must be greater than or equal to `2`. See [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency). You need to raise a [Service Quota Ticket](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) to increase the concurrency beyond 1000.

### self_managed_event_source Configuration Block

Expand Down

0 comments on commit b257779

Please sign in to comment.