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
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<HostName>danilop.net</HostName> | |
<ReplaceKeyWith/> | |
</Redirect> | |
</RoutingRule> |
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
#cloud-config | |
package_upgrade: true | |
packages: | |
- nfs-utils | |
- httpd | |
- php | |
runcmd: | |
- echo "$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).FILE_SYSTEM_ID.efs.us-west-2.amazonaws.com:/ /var/www/html/efs nfs4 defaults" >> /etc/fstab | |
- mkdir /var/www/html/efs | |
- mount -a |
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
"use strict"; | |
console.log('Loading function'); | |
// Your business logic | |
function greetingsFor(name) { | |
console.log('name: ', name); | |
if ((name == undefined) || (name == '')) { | |
name = 'World'; | |
} |
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
"use strict"; | |
console.log('Loading function'); | |
// Your business logic | |
function greetingsFor(name) { | |
console.log('name: ', name); | |
if ((name == undefined) || (name == '')) { | |
name = 'World'; | |
} |
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
aws cloudformation package -s3-bucket <YOUR_BUCKET> -s3-prefix packages \ | |
-template-file template.yaml -output-template-file packaged.yaml | |
aws cloudformation deploy -template-file packaged.yaml \ | |
-stack-name EvolutionaryDeployment -capabilities CAPABILITY_IAM |
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
async function listStackResources(stackName) { | |
console.log("Calling AWS CloudFormation to list Resources for Stack " + stackName); | |
return await manageApiPagination(CloudFormation, 'listStackResources', { | |
StackName: stackName | |
}, 'StackResourceSummaries'); | |
} |
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
async function runTests() { | |
let tests = []; | |
// Unit tests | |
tests.push(testFunction(functionName)); // With version | |
// Check all resources in the stack | |
let resources = await listStackResources(stackId); |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
Sample SAM Template using Application Auto Scaling + Provisioned Concurrency | |
Globals: | |
Function: | |
Timeout: 30 |
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 python | |
import boto3 | |
import argparse | |
from operator import itemgetter | |
from collections import defaultdict | |
def nested_defaultdict(): | |
return defaultdict(nested_defaultdict) |
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
#!/bin/bash | |
# Define default voice | |
default_voice="Ruth" | |
# Define available voices | |
voices=( | |
"Ruth:Female English (US)" | |
"Matthew:Male English (US)" | |
"Amy:Female English (British)" |