Skip to content

Instantly share code, notes, and snippets.

@TonSDe
TonSDe / ebextension-vhost.yaml
Created November 1, 2018 09:20
AWS Elastic Beanstalk : Enable .htaccess
files:
"/etc/httpd/conf.d/hello.conf":
mode: "000644"
owner: root
group: root
content: |
<VirtualHost *:80>
DocumentRoot /var/app/current
<Directory /var/app/current/>
Options Indexes FollowSymLinks
@keithweaver
keithweaver / put-object-on-aws-s3.php
Last active May 18, 2023 19:20
Upload an image/object to an AWS S3 Bucket using PHP
<?php
// Installed the need packages with Composer by running:
// $ composer require aws/aws-sdk-php
$filePath = "https://example.com/test.png";
require 'vendor/autoload.php';
$bucketName = 'YOUR_BUCKET_NAME';
$filePath = './YOUR_FILE_NAME.png';