Guest User

Untitled

a guest
Apr 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const s3 = new S3({ apiVersion: '2006-03-01' });
  2.  
  3. const JS_code = `
  4. let x = 'Hello World';
  5. `;
  6.  
  7. // I'm using the following method inside an async function.
  8. await s3.putObject({
  9. Bucket: 'my-bucket-gayashan',
  10. Key: 'myFile.js',
  11. ContentType:'binary',
  12. Body: Buffer.from(JS_code, 'binary')
  13. });
Add Comment
Please, Sign In to add comment