profile
viewpoint
Trivikram Kamat trivikr @aws Seattle, WA, USA https://twitter.com/trivikram Software Development Engineer | @nodejs core collaborator | @aws SDK JS maintainer | International Speaker

awsdocs/aws-doc-sdk-examples 2489

Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.rst file below.

nodejs/node-code-ide-configs 7

VSCode configs to use while developing on Node.js core

trivikr/aws-sdk-js-debug-test 1

Testing debug module with AWS JavaScript SDK v3

Amplifiyer/amplify-js 0

A declarative JavaScript library for application development using cloud services.

trivikr/1x.engineer 0

The official website of 1x Engineers around the world

trivikr/advanced-react-patterns-v2 0

Created with CodeSandbox

trivikr/alerting-kibana-plugin 0

Open Distro for Elasticsearch Kibana Alerting Plugin

trivikr/awesome-deno 0

🎉A curated list of awesome things related to Deno

trivikr/awesome-rust 0

A curated list of Rust code and resources.

trivikr/aws-cdk 0

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code

Pull request review commentnodejs/node

http2: report invalid for spaced header names

+// spaced headers+// psuedo heaers

typo

// psuedo headers
rexagod

comment created time in 10 hours

push eventtrivikr/aws-sdk-js-v3-workshop

dependabot-preview[bot]

commit sha 09d9ab50907b1d42eb3fd2face566b8c84007d89

chore(deps): [security] bump acorn from 5.7.3 to 5.7.4 (#161) Bumps [acorn](https://github.com/acornjs/acorn) from 5.7.3 to 5.7.4. **This update includes a security fix.** - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/5.7.3...5.7.4) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

view details

Imed Adel

commit sha 15cf1cf52fca7ef0db5aaededa335930c75a66e5

Remove credentials hack (#163)

view details

Alexander Forsyth

commit sha beeea6f5aa7e8275821f5a4efba03d1095a55028

Update node version with .nvmrc (#177) Co-authored-by: Alex Forsyth <alex-git@amazon.com>

view details

Trivikram Kamat

commit sha a23598ba961e6cb5beedcf131db676d76b544c40

feat: simplify aws-sdk-js-v3-workshop using CDK (#179)

view details

push time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

Use JavaScript SDK/CDK instead of aws cli or sam cli for setting up infrastructure

Is your feature request related to a problem? Please describe.

  • We currently use AWS CLI and SAM CLI for managing infrastructure in exercises
  • Since this is a workshop for JavaScript SDK v3, how about using JS SDK for managing the infrastructure?

Describe the solution you'd like Use JavaScript SDK/CDK instead of aws cli or sam cli for setting up infrastructure

closed time in 14 hours

trivikr

issue commentaws-samples/aws-sdk-js-v3-workshop

Use JavaScript SDK/CDK instead of aws cli or sam cli for setting up infrastructure

Closing as we automated lot of AWS infrastructure using CDK in https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

trivikr

comment created time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

Table was created in us-east-1 in backend

Describe the bug Table in DDB gets created in us-east-1 and end point is directed to same: "https://yst42vcc94.execute-api.us-east-1.amazonaws.com/" but not able to see contents in browser.

To Reproduce Steps to reproduce the behavior: Follow Exercise-1 steps.

Expected behavior Able to view contents in same regions as in config.

closed time in 14 hours

ckkrishn

issue closedaws-samples/aws-sdk-js-v3-workshop

Environment variable not supported on Windows

While using Windows 10 and following through exercise 1, the AWS_JS_SDK_ID was not handled properly, resulting in:

image

As a workaround, I changed all instances f $AWS_JS_SDK_ID in package.json

closed time in 14 hours

awschristou

issue commentaws-samples/aws-sdk-js-v3-workshop

Environment variable not supported on Windows

Closing as we no longer use Environment variables after moving Cloud infrastructure setup to CDK

Refs: https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

awschristou

comment created time in 14 hours

issue commentaws-samples/aws-sdk-js-v3-workshop

Table was created in us-east-1 in backend

The DynamoDB table is now created using CDK, which uses default region from AWS Config. The backend code also uses default region from AWS Config.

Refs: https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

ckkrishn

comment created time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

Not getting the list of identity-pools while running yarn identity-pools

Describe the bug While following the instructions mentioned in frontend redme of exercise 1, when I reached to execute the command to yarn identity-pools, it shows the identity-pool as empty array.

To Reproduce Steps to reproduce the behavior:

  1. Go to frontend redme of exercise 1
  2. Follow the instructions
  3. While executing yarn identity-pools, it shows the empty list

Expected behavior Instructions should be clear to find the right data.

Desktop (please complete the following information):

  • OS: ios
  • Browser Chrome
  • Version Latest

Additional context yarn run v1.17.3 $ aws cognito-identity list-identity-pools --max-results 20 { "IdentityPools": [] } ✨ Done in 1.24s.

closed time in 14 hours

vinaysinghbww

issue commentaws-samples/aws-sdk-js-v3-workshop

Not getting the list of identity-pools while running yarn identity-pools

Issue no longer exists as the action in yarn identity-pools is now automated using CDK. Refs: https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

vinaysinghbww

comment created time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

sam deploy fails with Exit status 255 due to missing S3 permissions

Describe the bug The deploy step of yarn bpd fails with exit status 255

To Reproduce yarn mb yarn bpd

Expected behavior yarn bpd passes

Stack Trace

11 silly lifecycle aws-sdk-js-v3-workshop-backend@1.0.0~deploy: Args: [ '-c',
11 silly lifecycle   'sam deploy --template-file packaged.yaml --stack-name $AWS_JS_SDK_ID --capabilities CAPABILITY_IAM' ]
12 silly lifecycle aws-sdk-js-v3-workshop-backend@1.0.0~deploy: Returned: code: 255  signal: null
13 info lifecycle aws-sdk-js-v3-workshop-backend@1.0.0~deploy: Failed to exec deploy script
14 verbose stack Error: aws-sdk-js-v3-workshop-backend@1.0.0 deploy: `sam deploy --template-file packaged.yaml --stack-name $AWS_JS_SDK_ID --capabilities CAPABILITY_IAM`
14 verbose stack Exit status 255
14 verbose stack     at EventEmitter.<anonymous> (/Users/<redacted>/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
14 verbose stack     at EventEmitter.emit (events.js:198:13)
14 verbose stack     at ChildProcess.<anonymous> (/Users/<redacted>/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
14 verbose stack     at ChildProcess.emit (events.js:198:13)
14 verbose stack     at maybeClose (internal/child_process.js:982:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

Additional context Updating default region to us-west-2 as indicated by #12 does not resolve the issue

closed time in 14 hours

Huniku

issue commentaws-samples/aws-sdk-js-v3-workshop

sam deploy fails with Exit status 255 due to missing S3 permissions

This issue non longer exists, as we don't use SAM CLI anymore Refs: https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

Huniku

comment created time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

Update README based on updates in #176

Is your feature request related to a problem? Please describe. The README is not updated with instructions/screenshots in PR https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/176

Describe the solution you'd like Post a PR with following README files updated on simplify-workshop branch https://github.com/aws-samples/aws-sdk-js-v3-workshop/tree/simplify-workshop:

Priorities for updating README:

  • Latest diffs required to move from v2 to v3
  • Screenshots of the package sizes using latest version of v2, and latest gamma version of v3
  • Updated setup and instructions
  • Comparison between v3 and v2 lambda duration

closed time in 14 hours

trivikr

issue commentaws-samples/aws-sdk-js-v3-workshop

Update README based on updates in #176

Closed in https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

trivikr

comment created time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

Exercise 1 yarn describe not working on Windows

Using Windows 10, when I type yarn describe in exercise 1 I get the following:

image

closed time in 14 hours

awschristou

issue commentaws-samples/aws-sdk-js-v3-workshop

Exercise 1 yarn describe not working on Windows

Resolving as yarn describe is no longer required after moving to AWS CDK Refs: https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

awschristou

comment created time in 14 hours

delete branch trivikr/aws-sdk-js-v3-workshop

delete branch : simplify-workshop

delete time in 14 hours

push eventaws-samples/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha a23598ba961e6cb5beedcf131db676d76b544c40

feat: simplify aws-sdk-js-v3-workshop using CDK (#179)

view details

push time in 14 hours

PR merged aws-samples/aws-sdk-js-v3-workshop

feat: simplify aws-sdk-js-v3-workshop using CDK

Issue #, if available:

  • Fixes https://github.com/aws-samples/aws-sdk-js-v3-workshop/issues/162
  • WIP PR was posted at https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/176

Description of changes: The attendees no longer have to set up any environment variables or edit YAML files. They just need to run following commands:

  • yarn (installs dependencies)
  • cd packages
  • yarn build:backend (generates bundles for backend lambda)
  • yarn cdk deploy (creates infrastructure, deploys backend and creates frontend resources)
  • yarn prepare:frontend (populates AWS resources in frontend config)
  • yarn start:frontend (starts ReactApp for testing frontend)

The production code for frontend can be tested with:

  • yarn start:frontend (generates production bundle for frontend code)
  • yarn serve:frontend (serves frontend prod bundle on localhost)

TODO (in separate PRs):

  • Use ts-morph to provide scripts for moving from v2 to v3
  • This will simplify workshop code, as we don't have to maintain duplicate code
  • The scripts can be made generic in future, to use them in actual production code for migration from v2 to v3
  • Experimental commits in https://github.com/trivikr/aws-sdk-js-v3-workshop/tree/infra-backend-frontend-tsmorph

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+11955 -4716

0 comment

129 changed files

trivikr

pr closed time in 14 hours

issue closedaws-samples/aws-sdk-js-v3-workshop

Simplify the workshop by reducing duplicate code and automating steps

Is your feature request related to a problem? Please describe.

There is lot of duplicate code in this workshop

  • Exercise1 backend src https://github.com/aws-samples/aws-sdk-js-v3-workshop/tree/master/Exercise1/backend/src
  • Exercise2 backend src https://github.com/aws-samples/aws-sdk-js-v3-workshop/tree/master/Exercise2/backend/src

If you go through the README, the things changing while moving to v3:

  • importing client in libs/dynamoDB.ts - can be exported to a util used by both v2 and v3

    -import { DynamoDB } from "@aws-sdk/client-dynamodb-node";
    +import { DynamoDBClient } from "@aws-sdk/client-dynamodb-node";
    
    -export default new DynamoDB({});
    +export default new DynamoDBClient({});
    
  • importing commands in individual files - can be avoided by exporting utils for individual commands (say putItem in this case)

    import crypto from "crypto";
    -import dynamoDB from "./libs/dynamoDB";
    +import dynamoDBClient from "./libs/dynamoDB";
    +import { PutItemCommand } from "@aws-sdk/client-dynamodb-node";
    import { success, failure } from "./libs/response";
    

The attendees have to go through lot of manual steps in this workshop.

  • For example, the initial set up steps for backend https://github.com/aws-samples/aws-sdk-js-v3-workshop/blob/master/Exercise1/backend/README.md#set-up

This can be avoided by using AWS CDK for automating infrastructure Example: https://github.com/trivikr/cdk-typescript-workshop

Describe the solution you'd like One solution I can think of is using yarn workspaces, and creating 4 packages:

  • aws-sdk-js-utils
    • contains utils which use AWS JS SDK v2, and can be called from aws-sdk-js-workshop
  • aws-sdk-js-v3-utils
    • contains utils which use AWS JS SDK v3, and can be called from aws-sdk-js-workshop
  • aws-sdk-js-workshop
    • The actual code for note taking application - where the only change workshop attendee will make is changing whether to import aws-sdk-js-utils or aws-sdk-js-v3-utils
  • aws-sdk-js-workshop-infra
    • The cdk application for deploying aws-sdk-js-workshop

By following this setup, workshop attendee will find it easy to go through the workshop code. And they'll spend most of the time on aws-sdk-js-utils package (experimenting with moving it to v3)

Describe alternatives you've considered Following the existing setup which is difficult to follow, and workshop attendees make lot of mistakes because of process involved.

closed time in 14 hours

trivikr

PR closed aws-samples/aws-sdk-js-v3-workshop

WIP PR: simplify aws-sdk-js-v3-workshop to use CDK

Issue #, if available: Aims to fix https://github.com/aws-samples/aws-sdk-js-v3-workshop/issues/162

Description of changes: This PR is posted to gather feedback, and can be tested by checking out infra-backend-frontend branch of trivikr fork https://github.com/trivikr/aws-sdk-js-v3-workshop/tree/infra-backend-frontend

The attendees no longer have to set up any environment variables or edit YAML files. They just need to run following commands:

  • yarn (installs dependencies)
  • cd Exercise1
  • yarn build:backend (generates bundles for backend lambda)
  • yarn cdk deploy (creates infrastructure, deploys backend and creates frontend resources)
  • yarn prepare:frontend (populates AWS resources in frontend config)
  • yarn start:frontend (starts ReactApp for testing frontend)

The production code for frontend can be tested with:

  • yarn build:frontend (generates production bundle for frontend code)
  • yarn serve:frontend (serves frontend prod bundle on localhost)

TODO (in a separate PR):

  • Update READMEs after incorporating comments
  • Use ts-morph to provide scripts for moving from v2 to v3
    • This will simplify workshop code, as we don't have to maintain duplicate code
    • The scripts can be made generic in future, to use them in actual production code for migration from v2 to v3
    • Experimental commits in https://github.com/trivikr/aws-sdk-js-v3-workshop/tree/infra-backend-frontend-tsmorph
  • If scripts work is complete, rename Exercise1 to packages and document exercises in README

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+5587 -4397

2 comments

76 changed files

trivikr

pr closed time in 14 hours

pull request commentaws-samples/aws-sdk-js-v3-workshop

WIP PR: simplify aws-sdk-js-v3-workshop to use CDK

Superceded by https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/179

trivikr

comment created time in 14 hours

push eventtrivikr/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha d154041067b6a108ae5e275cf7493a1448ebb937

fix: add removalpolicy.DESTROY for table

view details

push time in 14 hours

PR opened aws-samples/aws-sdk-js-v3-workshop

feat: simplify aws-sdk-js-v3-workshop using CDK

Issue #, if available:

  • Fixes https://github.com/aws-samples/aws-sdk-js-v3-workshop/issues/162
  • WIP PR was posted at https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/176

Description of changes: The attendees no longer have to set up any environment variables or edit YAML files. They just need to run following commands:

  • yarn (installs dependencies)
  • cd packages
  • yarn build:backend (generates bundles for backend lambda)
  • yarn cdk deploy (creates infrastructure, deploys backend and creates frontend resources)
  • yarn prepare:frontend (populates AWS resources in frontend config)
  • yarn start:frontend (starts ReactApp for testing frontend)

The production code for frontend can be tested with:

  • yarn start:frontend (generates production bundle for frontend code)
  • yarn serve:frontend (serves frontend prod bundle on localhost)

TODO (in separate PRs):

  • Use ts-morph to provide scripts for moving from v2 to v3
  • This will simplify workshop code, as we don't have to maintain duplicate code
  • The scripts can be made generic in future, to use them in actual production code for migration from v2 to v3
  • Experimental commits in https://github.com/trivikr/aws-sdk-js-v3-workshop/tree/infra-backend-frontend-tsmorph

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+11954 -4716

0 comment

129 changed files

pr created time in 14 hours

create barnchtrivikr/aws-sdk-js-v3-workshop

branch : simplify-workshop-frontend-v3

created branch time in 14 hours

push eventtrivikr/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha 50f041054bd970518a0bc15ecf3a3fd31a2778c6

chore: udpate frontend/README.md

view details

push time in 14 hours

create barnchtrivikr/aws-sdk-js-v3-workshop

branch : simplify-workshop-backend-v3

created branch time in 20 hours

push eventtrivikr/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha 012003140827147c11f4ffb9d2da4e1faa3947d5

chore: updated backend/README.md

view details

push time in 20 hours

push eventtrivikr/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha f50b7909beb97091eb15b0c87750de16d469ba23

chore: update root README.md

view details

Trivikram Kamat

commit sha 5f667c3e87e0657eb1944866bb60411d14abd9d9

feat: add packages/README.md

view details

Trivikram Kamat

commit sha d01b03d7c2fdba72d98fcf16da5b85ff3eb6b21f

chore: move CDK .gitignore to root

view details

Trivikram Kamat

commit sha dd5ebc0758ca18247b129349ed10b6408aa8da9e

chore: updated backend/README.md

view details

push time in 21 hours

push eventtrivikr/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha d628d7b68481b2da93f0f6434b065b004ce42357

chore: remove exercise1 from package.json names

view details

Trivikram Kamat

commit sha 88312ed49a9e99f8970d8ac7a4e90150008c60fb

chore: update launch scripts to frontend

view details

Trivikram Kamat

commit sha b45984b577c4ccbe249a1cd8dccba29f10172722

chore: move prepare:frontend script to scripts folder

view details

push time in a day

push eventtrivikr/aws-sdk-js-v3-workshop

Trivikram Kamat

commit sha 2569c2e9fcbd440b725804b1c0f238f9c1f7cb14

chore: add info about CDK in AmazonChangelog

view details

push time in a day

create barnchtrivikr/aws-sdk-js-v3-workshop

branch : simplify-workshop

created branch time in a day

PR opened aws/aws-sdk-js-v3

feat: add check for isTransientError

Issue #, if available: Internal issue JS-1810

Description of changes:

  • adds new function isTransientError in service-error-classification
  • Updates and uses SdkError type across error checks
    • Added MetadataBearer
    • Removed unused connectionError boolean, as it's now checked as "AbortError" or "TimeoutError" in handlers.
  • Removes the following status codes from RETRYABLE_STATUS_CODES:
    • 429: Covered under TooManyRequestsException which is a throttling error
    • 509: Covered under BandwidthLimitExceeded which is a throttling error

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+135 -63

0 comment

8 changed files

pr created time in 2 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 226d89b2a848be47126ae9c1eb6a6c8147742886

chore: added tests for isTransientError

view details

push time in 2 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 9aa2814c517c12e06c216f2074631b31b12665d9

chore: update changes removed during WIP

view details

push time in 2 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 79255b628a081ab0a56f8981c95368d716fb3302

chore: add tests for retryDecider

view details

push time in 2 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 3030084a56a24369ba2bd4f2dfe0e3e0bbe43dca

chore: use SdkError as a standard

view details

push time in 2 days

create barnchtrivikr/aws-sdk-js-v3

branch : new-retry-transient-errors-dev

created branch time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import {+  InitializeMiddleware,+  InitializeHandler,+  InitializeHandlerArguments,+  InitializeHandlerOptions,+  RequestHandler+} from "@aws-sdk/types";+import { v4 } from "uuid";++type WithSession = {+  SessionId?: string;+  [key: string]: any;+};++/**+ * Middleware that inject default sessionId for operations, and inject+ * the parameters from request to the response metadata. This is+ * necessary because the SDK cannot access any parameters other than+ * the result stream. So it copies the parameters from input to the same+ * parameters in the output.+ */+export const injectSessionIdMiddleware = (config: {+  requestHandler: RequestHandler<any, any>;+}): InitializeMiddleware<any, any> => (+  next: InitializeHandler<WithSession, WithSession>+) => async (args: InitializeHandlerArguments<WithSession>) => {+  if (args.input.SessionId === undefined && isWebSocket(config)) {+    args.input.SessionId = v4();+  }+  const requestParams = {+    ...args.input+  };+  const response = await next(args);+  const output = response.output;+  for (const key of Object.keys(output)) {+    if (output[key] === undefined && requestParams[key]) {+      output[key] = requestParams[key];+    }+  }+  return response;+};++const isWebSocket = (config: { requestHandler: RequestHandler<any, any> }) => {+  return config.requestHandler.metadata?.handlerProtocol === "websocket";+};

nit: arrow function

const isWebSocket = (config: { requestHandler: RequestHandler<any, any> }) =>
  config.requestHandler.metadata?.handlerProtocol === "websocket";
AllanFly120

comment created time in 2 days

issue closedseattlejs/seattlejs

Workshop proposal: Hands-on workshop with AWS JavaScript SDK v3

I'm creating this issue, as it was requested by several attendees during SeattleJS October meetup talk https://github.com/seattlejs/seattlejs/issues/176

Title of workshop

Hands-on workshop with AWS JavaScript SDK v3

Description

The AWS SDK for JavaScript enables developers to build libraries an applications that use AWS services. You can use the JavaScript API in the browser and inside Node.js applications on the server. The v3 is written in TypeScript, and adds several frequently requested features - like modular packages, better stack traces for debugging, middleware and more. In this workshop, you'll learn what's new in v3 by writing an example application.

Learning Objectives

By the end of this workshop, you will:

  • Learn how to update an existing v2 application to v3
  • Use AWS services you're familiar with in v3
  • Understand how modularization in v3 helps write cleaner code and improve performance by reducing bundle size
  • Examine useful stack traces in v3 for faster debugging and reduce operational load.
  • Inspect and customize request lifecycle using middleware in v3.

Presenters:

Format: 2-hour hands on workshop Target Audience: Developers consuming AWS services with JavaScript/Node.js SDK Level: Intermediate Prerequisites: Basic experience of coding in JavaScript and/or Node.js

closed time in 2 days

trivikr

issue commentseattlejs/seattlejs

Workshop proposal: Hands-on workshop with AWS JavaScript SDK v3

@bniedermeyer Closing this issue as workshop is not a priority for us right now. The interested attendees can be directed to self-service repository https://github.com/aws-samples/aws-sdk-js-v3-workshop/

FYI: The instructions and code in the repository are going to be simplified further in coming weeks. WIP PR https://github.com/aws-samples/aws-sdk-js-v3-workshop/pull/176

trivikr

comment created time in 2 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 658c2fdb1c7043e88020fac72abf92adcb8ab377

chore: re-add client-transcribe-streaming scripts (#1219)

view details

push time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { Provider, RequestSigner, RequestHandler } from "@aws-sdk/types";+import { SignatureV4 as BaseSignatureV4 } from "@aws-sdk/signature-v4";+import { SignatureV4 } from "./signer";++export interface WebSocketInputConfig {}++interface PreviouslyResolved {+  signer: Provider<RequestSigner>;+  requestHandler: RequestHandler<any, any>;+}++export interface WebSocketResolvedConfig {+  signer: Provider<RequestSigner>;+  requestHandler: RequestHandler<any, any>;+}++export function resolveWebSocketConfig<T>(+  input: T & WebSocketInputConfig & PreviouslyResolved+): T & WebSocketResolvedConfig {+  if (input.requestHandler.metadata?.handlerProtocol === "websocket") {+    return {+      ...input,+      signer: () =>+        input.signer().then(signerObj => {+          if (validateSigner(signerObj)) {+            return new SignatureV4({ signer: signerObj });+          }+          throw new Error(+            "Expected SignatureV4 signer, please check the client constructor."+          );+        })+    };+  } else {+    return input;+  }+}++function validateSigner(signer: any): signer is BaseSignatureV4 {+  // We cannot use instanceof here. Because we might import the wrong SignatureV4+  // constructor here as multiple version of packages maybe installed here.+  return (signer.constructor.toString() as string).indexOf("SignatureV4") >= 0;+}

nit: arrow function

const validateSigner = (signer: any): signer is BaseSignatureV4 => 
  // We cannot use instanceof here. Because we might import the wrong SignatureV4
  // constructor here as multiple version of packages maybe installed here.
  (signer.constructor.toString() as string).indexOf("SignatureV4") >= 0;
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import {+  InitializeMiddleware,+  InitializeHandler,+  InitializeHandlerArguments,+  InitializeHandlerOptions,+  RequestHandler+} from "@aws-sdk/types";+import { v4 } from "uuid";++type WithSession = {+  SessionId?: string;+  [key: string]: any;+};++/**+ * Middleware that inject default sessionId for operations, and inject+ * the parameters from request to the response metadata. This is+ * necessary because the SDK cannot access any parameters other than+ * the result stream. So it copy the parameters from input to the same+ * parameters in the output.+ */+export const injectSessionIdMiddleware = (config: {+  requestHandler: RequestHandler<any, any>;+}): InitializeMiddleware<any, any> => (+  next: InitializeHandler<WithSession, WithSession>+) => async (args: InitializeHandlerArguments<WithSession>) => {+  if (args.input.SessionId === undefined && isWebSocket(config)) {+    args.input.SessionId = v4();+  }+  const requestParams = {+    ...args.input+  };+  const response = await next(args);+  const output = response.output;+  for (const key of Object.keys(output)) {+    if (output[key] === undefined && requestParams[key]) {+      output[key] = requestParams[key];+    }+  }+  return response;

nit: FP equivalent

  if (args.input.SessionId === undefined && isWebSocket(config)) {
    args.input.SessionId = v4();
  }
  const response = await next(args);
  return {
    ...response,
    output: {
      ...response.output,
      ...Object.entries(response.output)
        .filter(([key, value]) => value === undefined && args.input[key])
        .map(([key]) => key)
        .reduce(
          (acc, key) => ({
            ...acc,
            [key]: args.input[key]
          }),
          {}
        )
    }
  };
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { HttpHandlerOptions, RequestHandlerMetadata } from "@aws-sdk/types";+import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";+import { formatUrl } from "@aws-sdk/util-format-url";++export interface WebSocketHandlerOptions {+  /**+   * The maximum time in milliseconds that the connection phase of a request+   * may take before the connection attempt is abandoned.+   */+  connectionTimeout?: number;+}++/**+ * Base handler for websocket requests. By default, the request input and output+ * body will be in a ReadableStream, because of interface consistency among middleware.+ * If ReadableStream is not available, like in React-Native, the response body+ * will be an async iterable.+ */+export class WebSocketHandler implements HttpHandler {+  public readonly metadata: RequestHandlerMetadata = {+    handlerProtocol: "websocket"+  };+  private readonly connectionTimeout: number;+  constructor({ connectionTimeout }: WebSocketHandlerOptions = {}) {+    this.connectionTimeout = connectionTimeout || 2000;+  }++  destroy(): void {}++  handle(+    request: HttpRequest,+    options: HttpHandlerOptions = {}+  ): Promise<{ response: HttpResponse }> {+    const url = formatUrl(request);+    const socket: WebSocket = new WebSocket(url);+    socket.binaryType = "arraybuffer";+    return waitForReady(socket, this.connectionTimeout)+      .then(() => {+        const { body } = request;+        const bodyStream = getIterator(body);+        return connect(socket, bodyStream);+      })+      .then(iterableToReadableStream)+      .then(bodyStream => ({+        response: new HttpResponse({+          statusCode: 200, // indicates connection success+          body: bodyStream+        })+      }));+  }+}++const waitForReady = (socket: WebSocket, connectionTimeout: number) =>+  new Promise((resolve, reject) => {+    const timeout = setTimeout(() => {+      reject({+        $metadata: {+          httpStatusCode: 500+        }+      });+    }, connectionTimeout);+    socket.onopen = () => {+      clearTimeout(timeout);+      resolve();+    };+  });++const connect = (+  socket: WebSocket,+  data: AsyncIterable<Uint8Array>+): AsyncIterable<Uint8Array> => {+  // To notify output stream any error thrown after response+  // is returned while data keeps streaming.+  let streamError: Error | undefined = undefined;+  const outputStream: AsyncIterable<Uint8Array> = {+    [Symbol.asyncIterator]: () => ({+      next: () => {+        return new Promise((resolve, reject) => {+          socket.onerror = error => {+            socket.onclose = null;+            socket.close();+            reject(error);+          };+          socket.onclose = () => {+            if (streamError) {+              reject(streamError);+            } else {+              resolve({+                done: true,+                value: undefined+              });+            }+          };+          socket.onmessage = event => {+            resolve({+              done: false,+              value: new Uint8Array(event.data)+            });+          };+        });+      }+    })+  };++  const send = async (): Promise<void> => {+    try {+      for await (const inputChunk of data) {+        socket.send(inputChunk);+      }+    } catch (err) {+      // We don't throw the error here because the send()'s returned+      // would already be settled by the time sending chunk throws error.+      // Instead, the notify the output stream to throw if there's+      // exceptions+      streamError = err;+    } finally {+      // WS status code: https://tools.ietf.org/html/rfc6455#section-7.4+      socket.close(1000);+    }+  };+  send();+  return outputStream;+};++/**+ * Transfer payload data to an AsyncIterable.+ * When the ReadableStream API is available in the runtime(e.g. browser), and+ * the request body is ReadableStream, so we need to transfer it to AsyncIterable+ * to make the stream consumable by WebSocket.+ */+function getIterator(stream: any): AsyncIterable<any> {+  // Noop if stream is already an async iterable+  if (stream[Symbol.asyncIterator]) return stream;+  else if (isReadableStream(stream)) {+    //If stream is a ReadableStream, transfer the ReadableStream to async iterable.+    //Reference: https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate+    const reader = stream.getReader();+    return {+      [Symbol.asyncIterator]: async function* () {+        try {+          while (true) {+            // Read from the stream+            const { done, value } = await reader.read();+            // Exit if we're done+            if (done) return;+            // Else yield the chunk+            yield value;+          }+        } finally {+          reader.releaseLock();+        }+      }+    };+  } else {+    //For other types, just wrap them with an async iterable.+    return {+      [Symbol.asyncIterator]: async function* () {+        yield stream;+      }+    };+  }+}++/**+ * Convert async iterable to a ReadableStream when ReadableStream API+ * is available(browsers). Otherwise, leave as it is(ReactNative).+ */+function iterableToReadableStream<T>(+  asyncIterable: AsyncIterable<T>+): ReadableStream<T> | AsyncIterable<T> {+  if (typeof ReadableStream !== "function") {+    return asyncIterable;+  }+  const iterator = asyncIterable[Symbol.asyncIterator]();+  return new ReadableStream({+    pull(controller) {+      return iterator.next().then(({ done, value }) => {+        if (done) {+          return controller.close();+        }+        controller.enqueue(value);+      });+    }+  });

Use iterableToReadableStream from eventstream-serde-browser?

AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { HttpHandlerOptions, RequestHandlerMetadata } from "@aws-sdk/types";+import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";+import { formatUrl } from "@aws-sdk/util-format-url";++export interface WebSocketHandlerOptions {+  /**+   * The maximum time in milliseconds that the connection phase of a request+   * may take before the connection attempt is abandoned.+   */+  connectionTimeout?: number;+}++/**+ * Base handler for websocket requests. By default, the request input and output+ * body will be in a ReadableStream, because of interface consistency among middleware.+ * If ReadableStream is not available, like in React-Native, the response body+ * will be an async iterable.+ */+export class WebSocketHandler implements HttpHandler {+  public readonly metadata: RequestHandlerMetadata = {+    handlerProtocol: "websocket"+  };+  private readonly connectionTimeout: number;+  constructor({ connectionTimeout }: WebSocketHandlerOptions = {}) {+    this.connectionTimeout = connectionTimeout || 2000;+  }++  destroy(): void {}++  handle(+    request: HttpRequest,+    options: HttpHandlerOptions = {}+  ): Promise<{ response: HttpResponse }> {+    const url = formatUrl(request);+    const socket: WebSocket = new WebSocket(url);+    socket.binaryType = "arraybuffer";+    return waitForReady(socket, this.connectionTimeout)+      .then(() => {+        const { body } = request;+        const bodyStream = getIterator(body);+        return connect(socket, bodyStream);+      })+      .then(iterableToReadableStream)+      .then(bodyStream => ({+        response: new HttpResponse({+          statusCode: 200, // indicates connection success+          body: bodyStream+        })+      }));+  }+}++const waitForReady = (socket: WebSocket, connectionTimeout: number) =>+  new Promise((resolve, reject) => {+    const timeout = setTimeout(() => {+      reject({+        $metadata: {+          httpStatusCode: 500+        }+      });+    }, connectionTimeout);+    socket.onopen = () => {+      clearTimeout(timeout);+      resolve();+    };+  });++const connect = (+  socket: WebSocket,+  data: AsyncIterable<Uint8Array>+): AsyncIterable<Uint8Array> => {+  // To notify output stream any error thrown after response+  // is returned while data keeps streaming.+  let streamError: Error | undefined = undefined;+  const outputStream: AsyncIterable<Uint8Array> = {+    [Symbol.asyncIterator]: () => ({+      next: () => {+        return new Promise((resolve, reject) => {+          socket.onerror = error => {+            socket.onclose = null;+            socket.close();+            reject(error);+          };+          socket.onclose = () => {+            if (streamError) {+              reject(streamError);+            } else {+              resolve({+                done: true,+                value: undefined+              });+            }+          };+          socket.onmessage = event => {+            resolve({+              done: false,+              value: new Uint8Array(event.data)+            });+          };+        });+      }+    })+  };++  const send = async (): Promise<void> => {+    try {+      for await (const inputChunk of data) {+        socket.send(inputChunk);+      }+    } catch (err) {+      // We don't throw the error here because the send()'s returned+      // would already be settled by the time sending chunk throws error.+      // Instead, the notify the output stream to throw if there's+      // exceptions+      streamError = err;+    } finally {+      // WS status code: https://tools.ietf.org/html/rfc6455#section-7.4+      socket.close(1000);+    }+  };+  send();+  return outputStream;+};++/**+ * Transfer payload data to an AsyncIterable.+ * When the ReadableStream API is available in the runtime(e.g. browser), and+ * the request body is ReadableStream, so we need to transfer it to AsyncIterable+ * to make the stream consumable by WebSocket.+ */+function getIterator(stream: any): AsyncIterable<any> {+  // Noop if stream is already an async iterable+  if (stream[Symbol.asyncIterator]) return stream;+  else if (isReadableStream(stream)) {+    //If stream is a ReadableStream, transfer the ReadableStream to async iterable.+    //Reference: https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate+    const reader = stream.getReader();+    return {+      [Symbol.asyncIterator]: async function* () {+        try {+          while (true) {+            // Read from the stream+            const { done, value } = await reader.read();+            // Exit if we're done+            if (done) return;+            // Else yield the chunk+            yield value;+          }+        } finally {+          reader.releaseLock();+        }+      }+    };

Use ReadableStreamtoIterable from eventstream-serde-browser?

    return {
      [Symbol.asyncIterator]: ReadableStreamtoIterable(stream)
    };
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { HttpHandlerOptions, RequestHandlerMetadata } from "@aws-sdk/types";+import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";+import { formatUrl } from "@aws-sdk/util-format-url";++export interface WebSocketHandlerOptions {+  /**+   * The maximum time in milliseconds that the connection phase of a request+   * may take before the connection attempt is abandoned.+   */+  connectionTimeout?: number;+}++/**+ * Base handler for websocket requests. By default, the request input and output+ * body will be in a ReadableStream, because of interface consistency among middleware.+ * If ReadableStream is not available, like in React-Native, the response body+ * will be an async iterable.+ */+export class WebSocketHandler implements HttpHandler {+  public readonly metadata: RequestHandlerMetadata = {+    handlerProtocol: "websocket"+  };+  private readonly connectionTimeout: number;+  constructor({ connectionTimeout }: WebSocketHandlerOptions = {}) {+    this.connectionTimeout = connectionTimeout || 2000;+  }++  destroy(): void {}++  handle(+    request: HttpRequest,+    options: HttpHandlerOptions = {}+  ): Promise<{ response: HttpResponse }> {+    const url = formatUrl(request);+    const socket: WebSocket = new WebSocket(url);+    socket.binaryType = "arraybuffer";+    return waitForReady(socket, this.connectionTimeout)+      .then(() => {+        const { body } = request;+        const bodyStream = getIterator(body);+        return connect(socket, bodyStream);+      })+      .then(iterableToReadableStream)+      .then(bodyStream => ({+        response: new HttpResponse({+          statusCode: 200, // indicates connection success+          body: bodyStream+        })+      }));+  }+}++const waitForReady = (socket: WebSocket, connectionTimeout: number) =>+  new Promise((resolve, reject) => {+    const timeout = setTimeout(() => {+      reject({+        $metadata: {+          httpStatusCode: 500+        }+      });+    }, connectionTimeout);+    socket.onopen = () => {+      clearTimeout(timeout);+      resolve();+    };+  });++const connect = (+  socket: WebSocket,+  data: AsyncIterable<Uint8Array>+): AsyncIterable<Uint8Array> => {+  // To notify output stream any error thrown after response+  // is returned while data keeps streaming.+  let streamError: Error | undefined = undefined;+  const outputStream: AsyncIterable<Uint8Array> = {+    [Symbol.asyncIterator]: () => ({+      next: () => {+        return new Promise((resolve, reject) => {+          socket.onerror = error => {+            socket.onclose = null;+            socket.close();+            reject(error);+          };+          socket.onclose = () => {+            if (streamError) {+              reject(streamError);+            } else {+              resolve({+                done: true,+                value: undefined+              });+            }+          };+          socket.onmessage = event => {+            resolve({+              done: false,+              value: new Uint8Array(event.data)+            });+          };+        });+      }+    })+  };++  const send = async (): Promise<void> => {+    try {+      for await (const inputChunk of data) {+        socket.send(inputChunk);+      }+    } catch (err) {+      // We don't throw the error here because the send()'s returned+      // would already be settled by the time sending chunk throws error.+      // Instead, the notify the output stream to throw if there's+      // exceptions+      streamError = err;+    } finally {+      // WS status code: https://tools.ietf.org/html/rfc6455#section-7.4+      socket.close(1000);+    }+  };+  send();+  return outputStream;+};++/**+ * Transfer payload data to an AsyncIterable.+ * When the ReadableStream API is available in the runtime(e.g. browser), and+ * the request body is ReadableStream, so we need to transfer it to AsyncIterable+ * to make the stream consumable by WebSocket.+ */+function getIterator(stream: any): AsyncIterable<any> {+  // Noop if stream is already an async iterable+  if (stream[Symbol.asyncIterator]) return stream;+  else if (isReadableStream(stream)) {+    //If stream is a ReadableStream, transfer the ReadableStream to async iterable.+    //Reference: https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate+    const reader = stream.getReader();+    return {+      [Symbol.asyncIterator]: async function* () {+        try {+          while (true) {+            // Read from the stream+            const { done, value } = await reader.read();+            // Exit if we're done+            if (done) return;+            // Else yield the chunk+            yield value;+          }+        } finally {+          reader.releaseLock();+        }+      }+    };+  } else {+    //For other types, just wrap them with an async iterable.+    return {+      [Symbol.asyncIterator]: async function* () {+        yield stream;+      }+    };+  }+}++/**+ * Convert async iterable to a ReadableStream when ReadableStream API+ * is available(browsers). Otherwise, leave as it is(ReactNative).+ */+function iterableToReadableStream<T>(+  asyncIterable: AsyncIterable<T>+): ReadableStream<T> | AsyncIterable<T> {

arrow function

const iterableToReadableStream = <T>(
  asyncIterable: AsyncIterable<T>
): ReadableStream<T> | AsyncIterable<T> => {
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import {+  RequestSigner,+  HttpRequest as IHttpRequest,+  RequestSigningArguments,+  RequestPresigner,+  RequestPresigningArguments+} from "@aws-sdk/types";+import { SignatureV4 as BaseSignatureV4 } from "@aws-sdk/signature-v4";+import { HttpRequest } from "@aws-sdk/protocol-http";++export class SignatureV4 implements RequestSigner, RequestPresigner {+  private readonly signer: BaseSignatureV4;+  constructor(options: { signer: BaseSignatureV4 }) {+    this.signer = options.signer;+  }++  public presign(+    originalRequest: IHttpRequest,+    options: RequestPresigningArguments = {}+  ): Promise<IHttpRequest> {+    return this.signer.presign(originalRequest, options);+  }++  public async sign(+    toSign: IHttpRequest,+    options?: RequestSigningArguments+  ): Promise<IHttpRequest> {+    if (HttpRequest.isInstance(toSign)) {+      // Presign the endpoint url with empty body, otherwise+      // the payload hash would be UNSINGED_PAYLOAD+      const originalBody = toSign.body;+      toSign.body = "";+      const signedRequest = await this.signer.presign(toSign, {+        expiresIn: 5 * 60 // presigned url must be expired within 5 mins+      } as any);+      signedRequest.body = originalBody;+      return signedRequest;

Can be simplified without using toSign or using extra variable originalBody

      const signedRequest = await this.signer.presign(
        { ...toSign, body: "" },
        {
          expiresIn: 5 * 60 // presigned url must be expired within 5 mins
        }
      );
      return {
        ...signedRequest,
        body: toSign.body
      };
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { HttpHandlerOptions, RequestHandlerMetadata } from "@aws-sdk/types";+import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";+import { formatUrl } from "@aws-sdk/util-format-url";++export interface WebSocketHandlerOptions {+  /**+   * The maximum time in milliseconds that the connection phase of a request+   * may take before the connection attempt is abandoned.+   */+  connectionTimeout?: number;+}++/**+ * Base handler for websocket requests. By default, the request input and output+ * body will be in a ReadableStream, because of interface consistency among middleware.+ * If ReadableStream is not available, like in React-Native, the response body+ * will be an async iterable.+ */+export class WebSocketHandler implements HttpHandler {+  public readonly metadata: RequestHandlerMetadata = {+    handlerProtocol: "websocket"+  };+  private readonly connectionTimeout: number;+  constructor({ connectionTimeout }: WebSocketHandlerOptions = {}) {+    this.connectionTimeout = connectionTimeout || 2000;+  }++  destroy(): void {}++  handle(+    request: HttpRequest,+    options: HttpHandlerOptions = {}+  ): Promise<{ response: HttpResponse }> {+    const url = formatUrl(request);+    const socket: WebSocket = new WebSocket(url);+    socket.binaryType = "arraybuffer";+    return waitForReady(socket, this.connectionTimeout)+      .then(() => {+        const { body } = request;+        const bodyStream = getIterator(body);+        return connect(socket, bodyStream);+      })+      .then(iterableToReadableStream)+      .then(bodyStream => ({+        response: new HttpResponse({+          statusCode: 200, // indicates connection success+          body: bodyStream+        })+      }));+  }

Function can be simplified using async-await

  async handle(
    request: HttpRequest,
    options: HttpHandlerOptions = {}
  ): Promise<{ response: HttpResponse }> {
    const url = formatUrl(request);
    const socket: WebSocket = new WebSocket(url);
    socket.binaryType = "arraybuffer";
    await waitForReady(socket, this.connectionTimeout);
    const { body } = request;
    const bodyStream = getIterator(body);
    const asyncIterable = connect(socket, bodyStream);
    const bodyStream_1 = iterableToReadableStream(asyncIterable);
    return ({
      response: new HttpResponse({
        statusCode: 200,
        body: bodyStream_1
      })
    });
  }

I also removed unnecessary await for iterableToReadableStream in above suggestion

AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import {+  InitializeMiddleware,+  InitializeHandler,+  InitializeHandlerArguments,+  InitializeHandlerOptions,+  RequestHandler+} from "@aws-sdk/types";+import { v4 } from "uuid";++type WithSession = {+  SessionId?: string;+  [key: string]: any;+};++/**+ * Middleware that inject default sessionId for operations, and inject+ * the parameters from request to the response metadata. This is+ * necessary because the SDK cannot access any parameters other than+ * the result stream. So it copy the parameters from input to the same+ * parameters in the output.+ */+export const injectSessionIdMiddleware = (config: {+  requestHandler: RequestHandler<any, any>;+}): InitializeMiddleware<any, any> => (+  next: InitializeHandler<WithSession, WithSession>+) => async (args: InitializeHandlerArguments<WithSession>) => {+  if (args.input.SessionId === undefined && isWebSocket(config)) {+    args.input.SessionId = v4();+  }+  const requestParams = {+    ...args.input+  };+  const response = await next(args);+  const output = response.output;+  for (const key of Object.keys(output)) {+    if (output[key] === undefined && requestParams[key]) {+      output[key] = requestParams[key];+    }+  }+  return response;+};++function isWebSocket(config: { requestHandler: RequestHandler<any, any> }) {+  return config.requestHandler.metadata?.handlerProtocol === "websocket";+}

nit: arrow function

const isWebSocket = (config: { requestHandler: RequestHandler<any, any> }) =>
  config.requestHandler.metadata?.handlerProtocol === "websocket";
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import {+  InitializeMiddleware,+  InitializeHandler,+  InitializeHandlerArguments,+  InitializeHandlerOptions,+  RequestHandler+} from "@aws-sdk/types";+import { v4 } from "uuid";++type WithSession = {+  SessionId?: string;+  [key: string]: any;+};++/**+ * Middleware that inject default sessionId for operations, and inject+ * the parameters from request to the response metadata. This is+ * necessary because the SDK cannot access any parameters other than+ * the result stream. So it copy the parameters from input to the same

nit

 * the result stream. So it copies the parameters from input to the same
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { Provider, RequestSigner, RequestHandler } from "@aws-sdk/types";+import { SignatureV4 as BaseSignatureV4 } from "@aws-sdk/signature-v4";+import { SignatureV4 } from "./signer";++export interface WebSocketInputConfig {}++interface PreviouslyResolved {+  signer: Provider<RequestSigner>;+  requestHandler: RequestHandler<any, any>;+}++export interface WebSocketResolvedConfig {+  signer: Provider<RequestSigner>;+  requestHandler: RequestHandler<any, any>;+}++export function resolveWebSocketConfig<T>(+  input: T & WebSocketInputConfig & PreviouslyResolved+): T & WebSocketResolvedConfig {+  if (input.requestHandler.metadata?.handlerProtocol === "websocket") {+    return {+      ...input,+      signer: () =>+        input.signer().then(signerObj => {+          if (validateSigner(signerObj)) {+            return new SignatureV4({ signer: signerObj });+          }+          throw new Error(+            "Expected SignatureV4 signer, please check the client constructor."+          );+        })+    };+  } else {+    return input;+  }+}

Can be simplified using an arrow function and async-await

export const resolveWebSocketConfig = <T>(
  input: T & WebSocketInputConfig & PreviouslyResolved
): T & WebSocketResolvedConfig =>
  input.requestHandler.metadata?.handlerProtocol !== "websocket"
    ? input
    : {
        ...input,
        signer: async () => {
          const signerObj = await input.signer();
          if (validateSigner(signerObj)) {
            return new SignatureV4({ signer: signerObj });
          }
          throw new Error(
            "Expected SignatureV4 signer, please check the client constructor."
          );
        }
      };
AllanFly120

comment created time in 2 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

+import { HttpHandlerOptions, RequestHandlerMetadata } from "@aws-sdk/types";+import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";+import { formatUrl } from "@aws-sdk/util-format-url";+/**

nit:


/**
AllanFly120

comment created time in 3 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

 /**  * Convert ReadableStream into an async iterable.+ * Reference: https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate  */ export async function* ReadableStreamtoIterable<T>(-  readableStream: ReadableStream+  readableStream: ReadableStream<T> ): AsyncIterable<T> {   const reader = readableStream.getReader();-  let done = false;-  while (!done) {-    const { done: end, value } = await reader.read();-    if (end) {-      done = true;-      break;-    }-    if (value) {-      yield value;+  try {+    while (true) {+      // Read from the stream+      const { done, value } = await reader.read();+      // Exit if we're done+      if (done) return;+      // Else yield the chunk+      yield value as T;     }+  } finally {+    reader.releaseLock();   } }++/**+ * Convert async iterable to a ReadableStream.+ */+export function iterableToReadableStream<T>(+  asyncIterable: AsyncIterable<T>+): ReadableStream<T> {+  const iterator = asyncIterable[Symbol.asyncIterator]();+  return new ReadableStream({+    pull(constroller) {

Also, it can be converted to async function:

async pull(controller) {
  const { done, value } = await iterator.next();
  if (done) {
    return controller.close();
  }
  controller.enqueue(value);
}
AllanFly120

comment created time in 3 days

Pull request review commentaws/aws-sdk-js-v3

feat: support bi-directional transcribe streaming over Websocket

 /**  * Convert ReadableStream into an async iterable.+ * Reference: https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate  */ export async function* ReadableStreamtoIterable<T>(-  readableStream: ReadableStream+  readableStream: ReadableStream<T> ): AsyncIterable<T> {   const reader = readableStream.getReader();-  let done = false;-  while (!done) {-    const { done: end, value } = await reader.read();-    if (end) {-      done = true;-      break;-    }-    if (value) {-      yield value;+  try {+    while (true) {+      // Read from the stream+      const { done, value } = await reader.read();+      // Exit if we're done+      if (done) return;+      // Else yield the chunk+      yield value as T;     }+  } finally {+    reader.releaseLock();   } }++/**+ * Convert async iterable to a ReadableStream.+ */+export function iterableToReadableStream<T>(+  asyncIterable: AsyncIterable<T>+): ReadableStream<T> {+  const iterator = asyncIterable[Symbol.asyncIterator]();+  return new ReadableStream({+    pull(constroller) {

typo: update also needed on lines 34 and 36

    pull(controller) {
AllanFly120

comment created time in 3 days

delete branch trivikr/aws-sdk-js-v3

delete branch : readd-custom-scripts-client-transcribe-streaming

delete time in 3 days

push eventaws/aws-sdk-js-v3

Trivikram Kamat

commit sha 658c2fdb1c7043e88020fac72abf92adcb8ab377

chore: re-add client-transcribe-streaming scripts (#1219)

view details

push time in 3 days

PR merged aws/aws-sdk-js-v3

chore: re-add client-transcribe-streaming scripts

Issue #, if available: Fixes: https://github.com/aws/aws-sdk-js-v3/issues/1218

Description of changes:

  • The custom scripts required for client-transcribe-streaming were removed in codegen PR https://github.com/aws/aws-sdk-js-v3/pull/1213. This PR re-introduces them.
  • The codegen was updated to not overwrite these scripts in https://github.com/aws/aws-sdk-js-v3/pull/1207

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+4 -1

1 comment

1 changed file

trivikr

pr closed time in 3 days

issue closedaws/aws-sdk-js-v3

CI fails in PRs with "build:cjs" not found for @aws-sdk/client-transcribe-streaming

Describe the bug CI is failing on master

<details> <summary>Output</summary>

$ tsc
lerna ERR! yarn run pretest exited 1 in '@aws-sdk/client-transcribe-streaming'
lerna ERR! yarn run pretest stdout:
$ yarn build
$ yarn build:cjs && yarn build:es
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run pretest stderr:
error Command "build:cjs" not found.
error Command failed with exit code 1.
error Command failed with exit code 1.

lerna ERR! yarn run pretest exited 1 in '@aws-sdk/client-transcribe-streaming'
lerna WARN complete Waiting for 6 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

</details>

Example: https://github.com/aws/aws-sdk-js-v3/pull/1213

To Reproduce (observed behavior) Run yarn test:all on master

Expected behavior yarn test:all should succeed on master

closed time in 3 days

trivikr

push eventtrivikr/doc_website

Luca Casonato

commit sha 427ede28362fdb5bf9555521a9f84331c8133d6b

Fixed nested namespaces (#107)

view details

Trivikram Kamat

commit sha 254c7103d170bbb40965ecdfa69a489be9650a8b

Merge branch 'master' into padding-link

view details

push time in 3 days

pull request commentdenoland/doc_website

Add .vercel to .gitignore

could you merge with master?

rebased from master

trivikr

comment created time in 3 days

push eventtrivikr/doc_website

Luca Casonato

commit sha 96e91ea822095e6ec8d710b80d1fbba922bcc9df

Fix Vercel deploy (#102)

view details

木杉

commit sha defd0a821f61f7014997093493d30ab315ebf8f6

fix: sidebar height (#106)

view details

Luca Casonato

commit sha 427ede28362fdb5bf9555521a9f84331c8133d6b

Fixed nested namespaces (#107)

view details

Trivikram Kamat

commit sha 4da50900565ba0109a5bb0090684b853bc667455

Add .vercel to .gitignore

view details

push time in 3 days

PR opened aws/aws-sdk-js-v3

chore: re-add client-transcribe-streaming scripts removed by codegen

Issue #, if available: Fixes: https://github.com/aws/aws-sdk-js-v3/issues/1218

Description of changes:

  • The custom scripts required for client-transcribe-streaming were removed in codegen PR https://github.com/aws/aws-sdk-js-v3/pull/1213. This PR re-introduces them.
  • The codegen was updated to not overwrite these scripts in https://github.com/aws/aws-sdk-js-v3/pull/1207

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+4 -1

0 comment

1 changed file

pr created time in 3 days

IssuesEvent

delete branch trivikr/smithy-typescript

delete branch : check-sensitive-trait-for-shape-members

delete time in 3 days

push eventawslabs/smithy-typescript

Trivikram Kamat

commit sha 1d875e4a7cdfed30b070b66a1e6f32c6fc2ccf85

Check for sensitive trait in Shape members (#181)

view details

push time in 3 days

PR merged awslabs/smithy-typescript

Check for sensitive trait in Shape members

Issue #, if available: Follow-up to https://github.com/awslabs/smithy-typescript/pull/170

Description of changes:

  • Check for sensitive trait in Shape members
  • CodeGen PR https://github.com/aws/aws-sdk-js-v3/pull/1213

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+221 -22

0 comment

9 changed files

trivikr

pr closed time in 3 days

push eventtrivikr/aws-sdk-js-v3

AllanFly120

commit sha 22c9c7be88819e09481b7d3777ad3f20f22d40f8

chore: allow un-overwritable scripts and devDependencies in package.json (#1207) Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>

view details

Trivikram Kamat

commit sha fb451787a755b4244b20f6f598cb9757b41c2bf0

chore: update yarn.lock (#1217)

view details

Trivikram Kamat

commit sha 840ea04234a303540f96b5c5eee7baaa16980e70

chore: codegen to check sensitive trait in shape members (#1213)

view details

push time in 3 days

issue closedaws/aws-sdk-js-v3

CI fails in PRs with "build:cjs" not found for @aws-sdk/client-transcribe-streaming

Describe the bug CI is failing on master

<details> <summary>Output</summary>

$ tsc
lerna ERR! yarn run pretest exited 1 in '@aws-sdk/client-transcribe-streaming'
lerna ERR! yarn run pretest stdout:
$ yarn build
$ yarn build:cjs && yarn build:es
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run pretest stderr:
error Command "build:cjs" not found.
error Command failed with exit code 1.
error Command failed with exit code 1.

lerna ERR! yarn run pretest exited 1 in '@aws-sdk/client-transcribe-streaming'
lerna WARN complete Waiting for 6 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

</details>

Example: https://github.com/aws/aws-sdk-js-v3/pull/1213

To Reproduce (observed behavior) Run yarn test:all on master

Expected behavior yarn test:all should succeed on master

closed time in 3 days

trivikr

delete branch trivikr/aws-sdk-js-v3

delete branch : check-sensitive-trait-for-shape-members

delete time in 3 days

push eventaws/aws-sdk-js-v3

Trivikram Kamat

commit sha 840ea04234a303540f96b5c5eee7baaa16980e70

chore: codegen to check sensitive trait in shape members (#1213)

view details

push time in 3 days

PR merged aws/aws-sdk-js-v3

chore: codegen to check sensitive trait in shape members

Issue #, if available: Refs: https://github.com/awslabs/smithy-typescript/pull/181

Description of changes: codegen to check sensitive trait in shape members

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+7892 -55989

4 comments

216 changed files

trivikr

pr closed time in 3 days

pull request commentaws/aws-sdk-js-v3

chore: codegen to check sensitive trait in shape members

Verified that CI failure is not related to this PR The code in https://github.com/aws/aws-sdk-js-v3/pull/1207 was merged to ensure this doesn't happen again

trivikr

comment created time in 3 days

delete branch trivikr/aws-sdk-js-v3

delete branch : update-yarn-lock

delete time in 3 days

push eventaws/aws-sdk-js-v3

Trivikram Kamat

commit sha fb451787a755b4244b20f6f598cb9757b41c2bf0

chore: update yarn.lock (#1217)

view details

push time in 3 days

PR merged aws/aws-sdk-js-v3

chore: update yarn.lock

Issue #, if available: The dependencies appear to be added in https://github.com/aws/aws-sdk-js-v3/pull/1082

Description of changes: Update yarn.lock

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+7 -57

1 comment

1 changed file

trivikr

pr closed time in 3 days

push eventaws/aws-sdk-js-v3

AllanFly120

commit sha 22c9c7be88819e09481b7d3777ad3f20f22d40f8

chore: allow un-overwritable scripts and devDependencies in package.json (#1207) Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>

view details

push time in 3 days

PR merged aws/aws-sdk-js-v3

chore: allow un-overwritable scripts and devDependencies in package.json

There are 2 changes with this PR:

  1. If a client's package.json contains a local NPM scripts or devDependencies, they would be removed by codegen because these new entries don't exist package.json's template. This change avoids removing these entries. What is not changed: for the entries in scripts or devDependencies and exist in both newly generated client and existing client, the script prefers the ones in existing client.

  2. Temporarily pin the newly added internal dependencies version. We will review this before GA.(maybe re-introduce the range dependencies)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+25 -1

3 comments

1 changed file

AllanFly120

pr closed time in 3 days

pull request commentaws/aws-sdk-js-v3

chore: allow un-overwritable scripts and dev dependencies in package.json

Merging to unblock https://github.com/aws/aws-sdk-js-v3/issues/1218

AllanFly120

comment created time in 3 days

issue openedaws/aws-sdk-js-v3

CI fails in PRs with "build:cjs" not found for @aws-sdk/client-transcribe-streaming

Describe the bug CI is failing on master

<details> <summary>Output</summary>

$ tsc
lerna ERR! yarn run pretest exited 1 in '@aws-sdk/client-transcribe-streaming'
lerna ERR! yarn run pretest stdout:
$ yarn build
$ yarn build:cjs && yarn build:es
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run pretest stderr:
error Command "build:cjs" not found.
error Command failed with exit code 1.
error Command failed with exit code 1.

lerna ERR! yarn run pretest exited 1 in '@aws-sdk/client-transcribe-streaming'
lerna WARN complete Waiting for 6 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

</details>

Example: https://github.com/aws/aws-sdk-js-v3/pull/1213

To Reproduce (observed behavior) Run yarn test:all on master

Expected behavior yarn test:all should succeed on master

created time in 3 days

PR opened aws/aws-sdk-js-v3

chore: update yarn.lock

Issue #, if available: The dependencies appear to be added in https://github.com/aws/aws-sdk-js-v3/pull/1082

Description of changes: Update yarn.lock

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+7 -57

0 comment

1 changed file

pr created time in 3 days

create barnchtrivikr/aws-sdk-js-v3

branch : update-yarn-lock

created branch time in 3 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 7e7ee6ea63bf286a758b835b0035a8f7764c88fa

chore: add missing throttling errors (#1205)

view details

Trivikram Kamat

commit sha a27d7a5c847ce14e813800e9b392233df2714d9e

chore: codegen to check sensitive trait in shape members

view details

Trivikram Kamat

commit sha 2b8c04a13f54036deed1d7e5175d479b446e870c

chore: codegen to remove redundant calls in filterSensitiveLog for structures

view details

push time in 3 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha 7e7ee6ea63bf286a758b835b0035a8f7764c88fa

chore: add missing throttling errors (#1205)

view details

push time in 3 days

push eventaws/aws-sdk-js

Trivikram Kamat

commit sha 3616156b0ca66f652f0ef8bec41369ebac886994

chore(deps): bump buffer from 4.9.1 to 4.9.2 (#3285)

view details

push time in 3 days

delete branch trivikr/aws-sdk-js

delete branch : update-buffer

delete time in 3 days

PR merged aws/aws-sdk-js

chore(deps): bump buffer from 4.9.1 to 4.9.2

Warning shown while running yarn install

$ yarn
yarn install v1.22.4
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
Checklist
  • [x] npm run test passes
  • [ ] changelog is added, npm run add-change
+2 -2

2 comments

1 changed file

trivikr

pr closed time in 3 days

pull request commentaws/aws-sdk-js

chore(deps): bump buffer from 4.9.1 to 4.9.2

Integration tests are successful

$ npm run integration
...
...
190 scenarios (190 passed)
726 steps (726 passed)
trivikr

comment created time in 3 days

push eventaws/aws-sdk-js-v3

Trivikram Kamat

commit sha 7e7ee6ea63bf286a758b835b0035a8f7764c88fa

chore: add missing throttling errors (#1205)

view details

push time in 3 days

PR merged aws/aws-sdk-js-v3

chore: add missing throttling errors

Issue #, if available: Internally documented in JS-1810

Description of changes: The existing list of Throttling errors was added in Dec 2017 https://github.com/aws/aws-sdk-js-v3/commit/ae1aa480ca578879703c551e6b09a224e955a906

  • Missed throttling errors added in this PR:
    • TransactionInProgressException
    • LimitExceededException
    • EC2ThrottledException
  • PriorRequestNotComplete is moved from StillProcessingError to ThrottlingError
    • The API isStillProcessingError is being removed. It's internally only used in retryDecider, and low-level to be not used by pre-release users.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+14 -53

2 comments

4 changed files

trivikr

pr closed time in 3 days

delete branch trivikr/aws-sdk-js-v3

delete branch : update-throttling-errors

delete time in 3 days

push eventtrivikr/aws-sdk-js-v3

AllanFly120

commit sha 9b8372b3bdd77e5298a47e89cf696670fefa2665

fix(fetch-http-handler): handle empty blob in browsers (#1199) * fix(fetch-http-handler): handle empty blob in browsers * test: add test for handling null FileReader result * chore: rename karma tests to *.browser.spec.ts

view details

awstools

commit sha 910da6a07eb76f64738dce9374f1c197ebf228c1

Publish v1.0.0-gamma.2

view details

Trivikram Kamat

commit sha 1074b062014c2fdab59b1b88eecbd49efdee0a75

test: enable termination protection in CloudFormation integ test (#1194)

view details

Trivikram Kamat

commit sha 4895ac7070cf6d845846e0c3b40aa4ee6ad94f82

chore: simplify error codes to be an array of strings (#1203)

view details

Trivikram Kamat

commit sha 8eff0875580e30e12f2e0abd5fa402973790e697

feat: add filterSensitiveLog method to Structure namespaces (#1130)

view details

AllanFly120

commit sha af41a538f12314c696419f9e17942b7a8f7f22ed

feat: support bi-directional eventstream over H2 (#1082) * Add AddHttp2Dependency.java to add Http/2 request handler to TranscribeStreaming client. Currently only NodeJs requires special request handler for Http/2. * Add AddEventStreamHandlingDependency.java to support signing event stream in requests with SigV4 streaming spec * Add eventstream-handler-node and middleware-eventstream for JS implementation singing eventstream requests and handling eventstream flow control during retry. * Create a runtime-agnostic, async iterable based eventstream serialization and deserialization implementation in package eventstream-serde-universal. Nodejs-specific package eventstream-serde-node is a wrapper over eventstream-serde-universal with Nodejs stream interface.

view details

Trivikram Kamat

commit sha af4b039098053ad8e29c4bdd2c9f7efd7d7b629e

chore: update beta->gamma in README.md (#1210)

view details

Trivikram Kamat

commit sha a4c0736f1967b14b59279509a35cdba0a0a99e03

chore: update list of Throttling Error codes

view details

Trivikram Kamat

commit sha b4a8f48da4d224d5fd2fed0f02e583c981bb66eb

chore: remove isStillProcessingError reason: it's now part of Throttling Errors list

view details

push time in 3 days

PR opened aws/aws-sdk-js

chore(deps): bump buffer from 4.9.1 to 4.9.2
Checklist
  • [x] npm run test passes
  • [ ] changelog is added, npm run add-change
+2 -2

0 comment

1 changed file

pr created time in 3 days

create barnchtrivikr/aws-sdk-js

branch : update-buffer

created branch time in 3 days

push eventtrivikr/aws-sdk-js

AllanFly120

commit sha 16a799c0681c01dcafa7b30be5f16894861b3a32

s3 throws on 200 response with incomplete payload (#3259)

view details

Trivikram Kamat

commit sha d9727a901b1672b0f2af4e41fd2f09aec0b7d9ea

Add dualstack by modifying existing config.endpoint (#3270)

view details

AllanFly120

commit sha eb0f0ef06b50093e846bb411ed97235772bdc370

fix issues with required endpoint discovery feature (#3269) * fix issues with required endpoint discovery feature * For a given service; if at least one operation requires endpoint discovery then the SDK enables endpoint discovery by default for all operations of that service, including operations where endpoint discovery is optional. * Users can set config `endpointDiscoveryEnabled`, env `AWS_ENDPOINT_DISCOVERY_ENABLED`, config file entry `endpoint_discovery_enabled` to `false` to explictly disable endpoint discovery, even operations the require endpoint discovery will fail; * SDK throws if endpoint discovery is explicitly disabled but operation requires endpoint discovery; * Now SDK throws more clear error message when required endpoint operation fails * Address PR feedbacks

view details

awstools

commit sha f0ac2e53457c7512883d0677013eacaad6cd8a19

Updates SDK to v2.683.0

view details

awstools

commit sha 8505555ae8de36958cd70009fbb831306c60be60

Updates SDK to v2.684.0

view details

awstools

commit sha 95ed56f0f8008ac061da1a807f250b87658691b0

Updates SDK to v2.685.0

view details

Ajwinder Singh

commit sha 68a3fd65303f337ae7f8002d3ec9192ec8dfeb79

Delete no-response bot configuration file (#3268) Since the job is done by the action, this file can be deleted.

view details

push time in 3 days

pull request commentaws-samples/aws-sdk-js-v3-workshop

WIP PR: simplify aws-sdk-js-v3-workshop to use CDK

This PR will be kept open for comments till 05/30 We plan to merge it to master on 05/31 after updating README https://github.com/aws-samples/aws-sdk-js-v3-workshop/issues/178

The work of writing scripts to easily move from v2 to v3 would be taken separately

trivikr

comment created time in 3 days

push eventtrivikr/aws-sdk-js-v3

Trivikram Kamat

commit sha aac17a618fc460bf5dcc35b4cc28faf7ebf59be7

chore: codegen to remove redundant calls in filterSensitiveLog for structures

view details

push time in 4 days

push eventtrivikr/smithy-typescript

Trivikram Kamat

commit sha db849df77918e4b4d4597585a3ce38ff629ac26a

Check for sensitive trait in Structure members

view details

Trivikram Kamat

commit sha 4d3d833c24d1ba98045812a04410497f938ac43f

Add Set of parents in isMemberOverwriteRequired to avoid unending recursion

view details

Trivikram Kamat

commit sha 82f96696b72dd18dae14b014aa23c317fde9c44f

Add tests for members without sensitive trait

view details

Trivikram Kamat

commit sha 5fc0856351371ec82a4a4c1e289168e8521a627d

Remove redundant return false

view details

push time in 4 days

PR opened aws/aws-sdk-js-v3

chore: codegen to check sensitive trait in shape members

Issue #, if available: Refs: https://github.com/awslabs/smithy-typescript/pull/181

Description of changes: codegen to check sensitive trait in shape members

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

+36 -21

0 comment

7 changed files

pr created time in 4 days

more