-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-compose localstack #15
base: main
Are you sure you want to change the base?
Conversation
@NetanelBasal pls kindly review |
It does not work without it? I think the default is all services |
No. I would like to have a live example in the code. For example: https://www.zeolearn.com/magazine/uploading-files-to-aws-s3-using-nodejs |
Okay will do my best |
@NetanelBasal pls kindly check it out and review |
const BUCKET_NAME = "nxboy"; | ||
|
||
const s3 = new AWS.S3({ | ||
region: "us-east-1", | ||
accessKeyId: KEY_ID, | ||
secretAccessKey: SECRET_KEY, | ||
endpoint: 'http://localhost:4566', // This is the localstack EDGE_PORT | ||
s3ForcePathStyle: true, | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very specific s3 bucket? what's the intention here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harellevy just an example to create a localstack s3 bucket
localstack-s3/upload.js
Outdated
// const uploadFile = (filename) => { | ||
// const filecontent = fs.readFileSync(filename); | ||
|
||
// const params = { | ||
// Bucket: BUCKET_NAME, | ||
// Key: "", | ||
// Body: filecontent, | ||
// ContentType: "" | ||
// } | ||
|
||
// s3.upload(params,(err, data)=>{ | ||
// if(err){ | ||
// console.log(err) | ||
// } | ||
// else{ | ||
// console.log("File uploaded successfully", data.Location) | ||
// } | ||
// }) | ||
// } | ||
|
||
// uploadFile("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i will
Thanks
@NetanelBasal pls kindly review and revert |
@NetanelBasal resolved #2 just added s3 to the env on docker-compose file