AWS Snippets
Quickly scaffold AWS S3, DynamoDB, controller/service logic, and EJS views for your Node.js project.
Usage
In any .js, .ts, or .ejs file, type a snippet prefix then press Tab to expand. For the index page EJS snippets, index, search, or table will now match.
Available Snippets
config
Creates AWS config with dotenv, S3Client, and DynamoDBDocument.
install
Inserts npm install command for required dependencies.
handleRenderIndex
Inserts the handleRenderIndex controller function.
handleRenderForm
Inserts the handleRenderForm controller function.
handleUpsert
Inserts the handleUpsert controller function.
handleDeleteById
Inserts the handleDeleteById controller function.
getLengthByType
Inserts the getLengthByType service function.
getAll
Inserts the getAll service function.
getById
Inserts the getById service function.
upsert
Inserts the upsert service function.
deleteById
Inserts the deleteById service function.
indexSearch
Inserts the search section for index.ejs.
indexTable
Inserts the table section for index.ejs.
form
Inserts EJS form page for create/update room.
app-init
Inserts the basic app.js version.
app-view
Inserts the app.js version with EJS view setup.
app
Inserts the full app.js with routes and multer.
Requirements
npm install nodemon multer express ejs dotenv @aws-sdk/lib-dynamodb @aws-sdk/client-s3 @aws-sdk/client-dynamodb