Skip to content

Commit c7d2e84

Browse files
author
awstools
committed
feat(client-lambda): This release adds SnapStart related exceptions to InvokeWithResponseStream API. IAM access related documentation is also added for this API.
1 parent 6902006 commit c7d2e84

File tree

5 files changed

+121
-83
lines changed

5 files changed

+121
-83
lines changed

clients/client-lambda/src/Lambda.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,6 +1699,9 @@ export class Lambda extends LambdaClient {
16991699
/**
17001700
* @public
17011701
* <p>Configure your Lambda functions to stream response payloads back to clients. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html">Configuring a Lambda function to stream responses</a>.</p>
1702+
* <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action. For details on how to set up
1703+
* permissions for cross-account invocations, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke">Granting function
1704+
* access to other accounts</a>.</p>
17021705
*/
17031706
public invokeWithResponseStream(
17041707
args: InvokeWithResponseStreamCommandInput,

clients/client-lambda/src/commands/InvokeWithResponseStreamCommand.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export interface InvokeWithResponseStreamCommandOutput extends InvokeWithRespons
3939
/**
4040
* @public
4141
* <p>Configure your Lambda functions to stream response payloads back to clients. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html">Configuring a Lambda function to stream responses</a>.</p>
42+
* <p>This operation requires permission for the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html">lambda:InvokeFunction</a> action. For details on how to set up
43+
* permissions for cross-account invocations, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke">Granting function
44+
* access to other accounts</a>.</p>
4245
* @example
4346
* Use a bare-bones client and the command you need to make an API call.
4447
* ```javascript
@@ -143,6 +146,16 @@ export interface InvokeWithResponseStreamCommandOutput extends InvokeWithRespons
143146
* @throws {@link ServiceException} (server fault)
144147
* <p>The Lambda service encountered an internal error.</p>
145148
*
149+
* @throws {@link SnapStartException} (client fault)
150+
* <p>The <code>afterRestore()</code>
151+
* <a href="https://docs.aws.amazon.com/lambda/latest/dg/snapstart-runtime-hooks.html">runtime hook</a> encountered an error. For more information, check the Amazon CloudWatch logs.</p>
152+
*
153+
* @throws {@link SnapStartNotReadyException} (client fault)
154+
* <p>Lambda is initializing your function. You can invoke the function when the <a href="https://docs.aws.amazon.com/lambda/latest/dg/functions-states.html">function state</a> becomes <code>Active</code>.</p>
155+
*
156+
* @throws {@link SnapStartTimeoutException} (client fault)
157+
* <p>Lambda couldn't restore the snapshot within the timeout limit.</p>
158+
*
146159
* @throws {@link SubnetIPAddressLimitReachedException} (server fault)
147160
* <p>Lambda couldn't set up VPC access for the Lambda function because one or more
148161
* configured subnets has no available IP addresses.</p>

clients/client-lambda/src/models/models_0.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,10 @@ export interface EventSourceMappingConfiguration {
12431243

12441244
/**
12451245
* <p>(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1,
1246-
* which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. </p>
1246+
* which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.</p>
1247+
* <note>
1248+
* <p>The minimum value that can be set is 60 seconds.</p>
1249+
* </note>
12471250
*/
12481251
MaximumRecordAgeInSeconds?: number;
12491252

@@ -2060,7 +2063,8 @@ export interface FunctionConfiguration {
20602063
FunctionArn?: string;
20612064

20622065
/**
2063-
* <p>The runtime environment for the Lambda function.</p>
2066+
* <p>The identifier of the function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html">runtime</a>. Runtime is required if the deployment package is a .zip file archive.</p>
2067+
* <p>The following list includes deprecated runtimes. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy">Runtime deprecation policy</a>.</p>
20642068
*/
20652069
Runtime?: Runtime | string;
20662070

@@ -4962,14 +4966,14 @@ export interface FunctionUrlConfig {
49624966
* <li>
49634967
* <p>
49644968
* <code>BUFFERED</code> – This is the default option. Lambda invokes your function
4965-
* using the <code>Invoke</code> API operation. Invocation results are available when the
4966-
* payload is complete. The maximum payload size is 6 MB.</p>
4969+
* using the <code>Invoke</code> API operation. Invocation results are available when the
4970+
* payload is complete. The maximum payload size is 6 MB.</p>
49674971
* </li>
49684972
* <li>
49694973
* <p>
49704974
* <code>RESPONSE_STREAM</code> – Your function streams payload results as they become available.
4971-
* Lambda invokes your function using the <code>InvokeWithResponseStream</code>
4972-
* API operation. The maximum response payload size is 20 MB, however, you can <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">request a quota increase</a>.</p>
4975+
* Lambda invokes your function using the <code>InvokeWithResponseStream</code>
4976+
* API operation. The maximum response payload size is 20 MB, however, you can <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/request-quota-increase.html">request a quota increase</a>.</p>
49734977
* </li>
49744978
* </ul>
49754979
*/

clients/client-lambda/src/protocols/Aws_restJson1.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5547,6 +5547,15 @@ const de_InvokeWithResponseStreamCommandError = async (
55475547
case "ServiceException":
55485548
case "com.amazonaws.lambda#ServiceException":
55495549
throw await de_ServiceExceptionRes(parsedOutput, context);
5550+
case "SnapStartException":
5551+
case "com.amazonaws.lambda#SnapStartException":
5552+
throw await de_SnapStartExceptionRes(parsedOutput, context);
5553+
case "SnapStartNotReadyException":
5554+
case "com.amazonaws.lambda#SnapStartNotReadyException":
5555+
throw await de_SnapStartNotReadyExceptionRes(parsedOutput, context);
5556+
case "SnapStartTimeoutException":
5557+
case "com.amazonaws.lambda#SnapStartTimeoutException":
5558+
throw await de_SnapStartTimeoutExceptionRes(parsedOutput, context);
55505559
case "SubnetIPAddressLimitReachedException":
55515560
case "com.amazonaws.lambda#SubnetIPAddressLimitReachedException":
55525561
throw await de_SubnetIPAddressLimitReachedExceptionRes(parsedOutput, context);

0 commit comments

Comments
 (0)