Skip to content

Commit

Permalink
Added handling of aws keys as env variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCasasOrtiz committed Nov 9, 2023
1 parent 9995989 commit e693152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ amplifytools.xcconfig
.secret-*
**.sample
#amplify-do-not-edit-end

.env
5 changes: 2 additions & 3 deletions src/components/Components/DropFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import viewerState from '../../state/ViewerState';
import { useNavigate, useLocation } from 'react-router-dom';
import { Storage } from "@aws-amplify/storage"
import * as AWS from 'aws-sdk';
import axios from 'axios';
import { useSnackbar } from 'notistack'


AWS.config.update({
accessKeyId: '', // replace with own credentials to test
secretAccessKey: '',
accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID, // replace with own credentials to test
secretAccessKey: process.env.REACT_APP_AWS_SECRET_KEY_ID,
region: 'us-west-2' // replace with your region
});

Expand Down

0 comments on commit e693152

Please sign in to comment.