Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe("update-item", () => {
const command = new GetCommand({
TableName: tableName,
Key: { Flavor: "Vanilla" },
ConsistentRead: true,
});

const beforeResponse = await client.send(command);
Expand Down
2 changes: 1 addition & 1 deletion javascriptv3/example_code/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Code excerpts that show you how to call individual service functions.
- [Invoke](actions/invoke.js#L5)
- [ListFunctions](actions/list-functions.js#L5)
- [UpdateFunctionCode](actions/update-function-code.js#L15)
- [UpdateFunctionConfiguration](actions/update-function-configuration.js#L12)
- [UpdateFunctionConfiguration](actions/update-function-configuration.js#L14)

### Scenarios

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import {
LambdaClient,
UpdateFunctionConfigurationCommand,
waitUntilFunctionUpdated,
} from "@aws-sdk/client-lambda";
import { readFileSync } from "node:fs";
import { dirnameFromMetaUrl } from "@aws-doc-sdk-examples/lib/utils/util-fs.js";
import { waitForFunctionUpdated } from "../waiters/index.js";

const dirname = dirnameFromMetaUrl(import.meta.url);

Expand All @@ -17,7 +19,9 @@ const updateFunctionConfiguration = (funcName) => {
...JSON.parse(config),
FunctionName: funcName,
});
return client.send(command);
const result = client.send(command);
waitForFunctionUpdated({ FunctionName: funcName });
return result;
};
/** snippet-end:[javascript.v3.lambda.actions.UpdateFunctionConfiguration] */

Expand Down
Loading