Skip to content

Instantly share code, notes, and snippets.

@dudekm
dudekm / async.php
Created November 8, 2022 20:29
ASYNC-AWS
<?php
declare(strict_types=1);
require_once __DIR__.'/vendor/autoload.php';
use AsyncAws\S3\S3Client;
use Symfony\Component\Console\Logger\ConsoleLogger;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
@dudekm
dudekm / aws.php
Last active November 8, 2022 15:22
<?php
declare(strict_types=1);
require_once __DIR__.'/vendor/autoload.php';
use Aws\S3\S3Client;
// Instantiate an Amazon S3 client.
$s3 = new S3Client([
@dudekm
dudekm / aws.js
Last active November 8, 2022 07:36
const AWS = require('aws-sdk')
require('dotenv').config()
const credentials = {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_KEY,
}
const useLocal = process.env.NODE_ENV !== 'production'