Category : amazon-web-services

I use the crypto package to do the following : crypto.generateKeyPairSync() to generate publicKey and privateKey I only created the keys once, and stored them in the .env file crypto.publicEncrypt() to encrypt data before storing it into the database crypto.privateDecrypt() to decrpyt data to render on HTML page (rendering data on html page is just ..

Read more

I am using AWS SDK3 to upload files to AWS S3. Its working fine from my React Component but not working from the webworker. Below is my code. import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"; const s3Client = new S3Client({ region: REGION, credentials: { accessKeyId: accessKeyId, secretAccessKey: secretAccessKey } }); const uploadParams = { Delimiter: ..

Read more

I have my static react app hosted in an AWS s3 bucket. It renders fine. However, I am utilizing react-router-dom to navigate between "pages." (I have enabled public access, enabled static website hosting, listed my index document as index.html). For example, my bucket website endpoint is http://<bucketname.s3-website-us-east-1.amazonaws.com. When I click on one of my navigation ..

Read more

I can successfully run describeIdentityPool command for the Cognito Identity Pool with "Enable access to unauthenticated identities" enabled: var AWS = require("aws-sdk"); let cognitoidentity = new AWS.CognitoIdentity(); var params = {IdentityPoolId: "myIdentityPoolID"}; cognitoidentity.describeIdentityPool(params, function(err, data) { if (err) { console.log(err, err.stack); } else { console.log( "…getCredentials.describeIdentityPool.data:", data); } }); But if I disable the "Enable ..

Read more

I recently started learning React, but right now I am having an issue import one of the components in App.js My current structure is: src –components —-Nav ——Nav.jsx –App.js Inside my App.js I have: import Nav from ‘./src/components/Nav/Nav’; However, I get the following error: ./src/App.js Module not found: Can’t resolve ‘./src/components/Nav/Nav’ in ‘PATH_TO_PROJECT/project/src’ My webpack.config.js ..

Read more