Skip to content

Conversation

@AllanZhengYP
Copy link

@AllanZhengYP AllanZhengYP commented Mar 11, 2020

As below are all the changes to the Lambda example:

  • Add flattened zip folder in to the repo, making it easier to contribute.
  • Update all the scripts, front-end code and back-end lambda function code into V3 flavor
  • Use webpack for frontend SDK code because V3 no longer provide browser SDK from CDN
  • Use webpack for bundling Lambda function because lambda native runtime doesn't provide modularized V3 SDK like V2 does. This means you cannot just type const AWS = require('aws-sdk') to import the SDK
  • TODO Other than these change, the paired doc needs to be updated as well.

The original repo only comes with a .zip archive which makes it very hard to show the code change.
So I deflated the archive in first commit. So if you see the second commit(d2af238), it contains all the code change migrating from V2 to V3

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ghost ghost assigned Doug-AWS Mar 11, 2020
@ghost ghost added JavaScript and removed on review labels Mar 12, 2020
@brmur
Copy link
Contributor

brmur commented Mar 27, 2020

Checklist:

  • The submitter has added unit tests for all code paths. An internal AWS code examples team member has run all of those tests and has collaborated with the submitter to address any and all failing tests.

  • The submitter has added some type of usage documentation to the code, at minimum a purpose statement.

  • An internal AWS code examples team member has run a linter on the code. That team member has collaborated with the submitter to address any and all linter issues relating to the internal team's minimum rules.

  • An internal AWS code examples team member has had their internal Editor edit all comments and strings, and that team member has collaborated with the submitter to address any and all resulting edits.

  • An internal AWS code examples team member has added all related API reporting metadata.

  • The submitter has resolved all conversations.

  • The submitter has squashed all commits into one (the last).

@ghost ghost assigned brmur and unassigned Doug-AWS Apr 2, 2020
@brmur
Copy link
Contributor

brmur commented Apr 23, 2020

@AllanFly120

  • in the following the region is predefined as 'us-west-2', but should be REGION, and instructions will be included for user to make changes
    index.js
    ddb-table-create.js
    ddb-table-populate.js
    ddb-table-populate.js
    lambda-function-setup.js
    lambda-role-setup.js
    s3-bucket-setup-non-modular.js
    s3-bucket-setup.js
    slotpull.js
    slotpull.js

  • lambdar_role_setup.js shows an error in command line (but still works)
    image

  • Error occuring on final result due to incognito errror (see here ) Firefox returns more information. I followed these instructions for creating a Cognito Identity Pool

Copy link
Contributor

@brmur brmur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 28; lambda-function-setup.js can we future proof the nodejs runtime version,
i.e.
Runtime: 'LATEST VERSION OF NODEJS' /required - e.g. 'nodejs12.x'/

@brmur
Copy link
Contributor

brmur commented Jul 1, 2020

@AllanFly120 All changes ported to #1252, where I also implemented clean up tasks for legacy code and added unit tests.

@brmur brmur closed this Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants