diff --git a/.gitignore b/.gitignore
index dfb7adc..bcbdff6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
# production
/build
+.env
# misc
.DS_Store
@@ -24,4 +25,4 @@ yarn-error.log*
# IDE
/.vscode
-.eslintcache
\ No newline at end of file
+.eslintcache
diff --git a/src/api/aws/aws-s3.js b/src/api/aws/aws-s3.js
new file mode 100644
index 0000000..2c3cdea
--- /dev/null
+++ b/src/api/aws/aws-s3.js
@@ -0,0 +1,49 @@
+import { useState } from "react";
+import AWS from "aws-sdk";
+
+function Profile() {
+ const [ownerData, setOwnerData] = useState("너영나영노영누영2");
+ const region = "ap-northeast-2";
+ const bucket = "osds-bucket";
+ const endpoint = "image/";
+
+ AWS.config.update({
+ region: region,
+ accessKeyId: process.env.REACT_APP_AWS_ACCESS_KEY_ID,
+ secretAccessKey: process.env.REACT_APP_AWS_SECRET_ACCESS_KEY,
+ });
+
+ const handleFileInput = async (e) => {
+ const file = e.target.files[0];
+
+ const upload = new AWS.S3.ManagedUpload({
+ params: {
+ Bucket: bucket, // 버킷 이름
+ Key: endpoint + ownerData + ".png", // 유저 아이디
+ Body: file, // 파일 객체
+ },
+ });
+ console.log(process.env.REACT_APP_AWS_ACCESS_KEY_ID);
+ console.log(process.env.REACT_APP_AWS_SECRET_ACCESS_KEY);
+
+ const promise = upload.promise();
+ promise.then(
+ function () {
+ alert("성공");
+ },
+ function (err) {
+ alert("실패");
+ console.log(err);
+ }
+ );
+ };
+
+ return (
+ <>
+
+
+ >
+ );
+}
+
+export default Profile;