Task5#1
Open
Ajay-Nallanagula wants to merge 4 commits into
Open
Conversation
| import * as AWS from "aws-sdk"; | ||
| const csv = require("csv-parser"); | ||
|
|
||
| const getS3BucketInstance = () => { |
There was a problem hiding this comment.
You loose in performance as well as money when you create new Sdk Client for every new function.
Better reuse this logic by defining all the clients beforehand.
https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html
Take advantage of execution environment reuse to improve the performance of your function. Initialize SDK clients and database connections outside of the function handler, and cache static assets locally in the /tmp directory. Subsequent invocations processed by the same instance of your function can reuse these resources. This saves cost by reducing function run time.
Owner
Author
There was a problem hiding this comment.
Will change this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task 5.1, 5.2, 5.3 . All three tasks done.
Used Async Await,
Did Copy and delete S3 Bucket Object Operations
Did not write test cases
Import Url : https://esauexgjw6.execute-api.ap-south-1.amazonaws.com/dev/import?name=<file_name>

PFB Sample PreSigned Url:
Frontend PR : Ajay-Nallanagula/nodejs-aws-fe#5
Frontend UI : https://d1zw82pbwmw3ax.cloudfront.net/
NOTE: Plz check the API Calls , using Developer tools. PFB the screenshots.