This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lookup the zone based on domain name | |
const zone = route53.HostedZone.fromLookup(this, 'baseZone', { | |
domainName: 'url2qr.me' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add the Subdomain to Route53 | |
const cName = new route53.CnameRecord(this, 'test.baseZone', { | |
zone: zone, | |
recordName: 'example', | |
domainName: publicAssets.bucketWebsiteDomainName | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import 'source-map-support/register'; | |
import * as cdk from '@aws-cdk/core'; | |
import { AwsCdkS3Stack } from '../lib/aws-cdk-s3-stack'; | |
const app = new cdk.App(); | |
new AwsCdkS3Stack(app, 'AwsCdkS3Stack', { | |
env: { | |
account: process.env.CDK_DEFAULT_ACCOUNT, | |
region: process.env.CDK_DEFAULT_REGION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cdk from '@aws-cdk/core'; | |
import * as s3 from '@aws-cdk/aws-s3'; | |
import * as s3Deployment from '@aws-cdk/aws-s3-deployment'; | |
import * as route53 from '@aws-cdk/aws-route53'; | |
export class AwsCdkS3Stack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
// Create the public S3 bucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Static Code into Bucket. | |
const deployment = new s3Deployment.BucketDeployment( | |
this, | |
'deployStaticWebsite', | |
{ | |
sources: [s3Deployment.Source.asset('./program/static')], | |
destinationBucket: publicAssets, | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update packages and install needed compilation dependencies | |
sudo yum update -y | |
sudo yum install autoconf bison gcc gcc-c++ libcurl-devel libxml2-devel -y | |
# Compile OpenSSL v1.0.1 from source, as Amazon Linux uses a newer version than the Lambda Execution Environment, which | |
# would otherwise produce an incompatible binary. | |
curl -sL http://www.openssl.org/source/openssl-1.0.1k.tar.gz | tar -xvz | |
cd openssl-1.0.1k | |
./config && make && sudo make install | |
cd ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function index($event) { | |
$invokedBy = $event['user']; | |
$output = " world!, function invoked by " . $invokedBy; | |
return('Hello' . $output); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install -y https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.rpm | |
wget https://services.gradle.org/distributions/gradle-6.5-bin.zip -P /tmp | |
sudo unzip -d /opt/gradle /tmp/gradle-6.5-bin.zip | |
export GRADLE_HOME=/opt/gradle/gradle-6.5 | |
export PATH=${GRADLE_HOME}/bin:${PATH} | |
cat >> ~/.bash_profile <<TXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
this.name="cfmlServerless"; | |
this.applicationTimeout = CreateTimeSpan(10, 0, 0, 0); //10 days | |
this.sessionManagement=false; | |
this.clientManagement=false; | |
this.setClientCookies=false; | |
// Yes yes, shoudl not embed in code but for PoC it's fine. | |
this.datasources = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfquery name="q" result="r"> | |
select * | |
from customer | |
</cfquery> | |
<cfdump var="#q#"/> | |
<cfdump var="#r.EXECUTIONTIME#"/> |