-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to configure Lambda Provisioned Concurrency. #22392
Comments
Hey @sreetejap 👋 Thank you for taking the time to file this, and for all of the great information you've already provided. In looking at this, I see that the error message you put in the debug output cuts off at |
I can replicate the issue during plan. It appears Terraform is not providing the Looking at one of the requests in CloudTrail: {
# ...
"requestParameters": {
"functionName": "myfunction"
},
"responseElements": null,
# ...
} The plan doesn't show anything with debug logs except the error:
I suspect something is going wrong with determining the correct qualifier... |
Looks like the error is because the resource ID should only be |
I had this issue , I destroyed all configurations using |
@sreetejap 's solution worked on my end, but instead of destroying everything, just manually remove the concurrency config in the AWS console and execute resource "aws_lambda_alias" "live" {
count = var.provisioned_concurrent_executions > -1 ? 1 : 0
name = "live"
function_name = aws_lambda_function.this.function_name
function_version = aws_lambda_function.this.version
}
resource "aws_lambda_provisioned_concurrency_config" "live" {
count = length(aws_lambda_alias.live.*.arn)
function_name = aws_lambda_alias.live[0].function_name
qualifier = aws_lambda_alias.live[0].name
provisioned_concurrent_executions = var.provisioned_concurrent_executions
} |
The docs for |
This functionality has been released in v5.4.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform CLI version: 1.0.9
Terraform AWS Provider version: >=3.38
Affected Resource(s)
Terraform Configuration Files
Debug Output
error getting Lambda Provisioned Concurrency Config (arn:aws:lambda:ca-central-1:xxxxxxxxxxxx:function:ifs-dev-ax-newcontact:ifs-dev-ax-newcontact-alias): ValidationException:
Expected Behavior
It should have applied the configuration successfully during
terraform apply
and created resourcesActual Behavior
Provisioned Concurrency for lambda alias is created successfully in AWS console but failed in apply on command line with the above mentioned error and further
terraform apply
is not going through. The way around is manually removingaws_lambda_provisioned_concurrency_config
resource from state usingterraform state rm aws_lambda_provisioned_concurrency_config.new_contact_lambda_alias
and remove manually in console and proceed with further applies.Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: