Go through this amazon link http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Capture Photo</title> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/> | |
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var pictureSource; // picture source | |
var destinationType; // sets the format of returned value |
function convertTimestamp(timestamp) { | |
var d = new Date(timestamp * 1000), // Convert the passed timestamp to milliseconds | |
yyyy = d.getFullYear(), | |
mm = ('0' + (d.getMonth() + 1)).slice(-2), // Months are zero based. Add leading 0. | |
dd = ('0' + d.getDate()).slice(-2), // Add leading 0. | |
hh = d.getHours(), | |
h = hh, | |
min = ('0' + d.getMinutes()).slice(-2), // Add leading 0. | |
ampm = 'AM', | |
time; |
define("DOMAIN", "test.se"); | |
define("MAILGUN_API", "XXX123"); // Mailgun Private API Key | |
function br2nl($string) { | |
return preg_replace('/\<br(\s*)?\/?\>/i', "\n", $string); | |
} | |
function mg_send($to, $subject, $message) { | |
$ch = curl_init(); |
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB(); | |
exports.handler = function(event, context) { | |
console.log("Request received:\n", JSON.stringify(event)); | |
console.log("Context received:\n", JSON.stringify(context)); | |
var tableName = "OurBlogDemo"; | |
var datetime = new Date().getTime().toString(); |
##Using Let's Encrypt certificates with AWS API Gateway
Before starting off with API Gateway set up it's worth mentioning that certificate configuration for this particular service is so far isn't well integrated, therefore different from other AWS services. Despite it using CloudFrount to serve on custom domains it won't let you customize distributions it creates, however all the limitations of CloudFront naturally apply to API Gateway. The most important in this case is the size of the key, which is limited by 2048 bit. Many tutorials provide ready to use terminal commands that have the key size preset at 4096 bit for the sake of better security. This won't work with API Gateway and you'll get an error message about certificate's validity or incorrect chain which won't suggest you the real cause of the issue. Another consideration is that to add a custom domain to API Gateway you have to have a certif
-
create a new repository in Github, don't add a readme or anything.
-
clone it on your computer
-
add the original repository (the one you want to fork) as upstream source.
git remote add upstream [url]
-
fetch and merge upstream.
See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux