Final answer:
Exhausting the available policy for AWS Lambda function invocations will result in throttling, where AWS will return a TooManyRequestsException error message. To manage this, one should monitor concurrency and possibly use Reserved Concurrency or Provisioned Concurrency controls. Implementing a queue can also help manage traffic spikes.
Step-by-step explanation:
If a AWS Lambda function invocations exhaust the available policy, it means that the function has reached the concurrency limit set by an AWS account's concurrency policy. When this occurs, any additional invocations triggered while the limit is reached will be throttled, and AWS Lambda will return a TooManyRequestsException error message (HTTP 429).
If the function is critical, it is advised to closely monitor and manage the concurrency limits using AWS management tools, such as AWS CloudWatch and AWS Lambda reserved concurrency settings.
In order to handle bursts of traffic and manage the scaling behavior, AWS offers two types of concurrency controls - Reserved Concurrency and Provisioned Concurrency. Reserved Concurrency guarantees a certain number of concurrent executions that can never be exceeded, while Provisioned Concurrency prewarms a specified number of instances to serve requests with double dispatch latency.
When the concurrency limit is hit, it's important to have a retry strategy and understand the expected scaling behavior of your Lambda functions. Employing a queue to hold incoming requests, like AWS SQS, may mitigate the impact of occasional spikes in traffic.