View OpenVPNWalkthrough-Part1.yaml
AWSTemplateFormatVersion: '2010-09-09' | |
Description: OpenVPN Stack | |
Parameters: | |
OpenVPNPort: | |
Type: Number | |
Default: 1194 | |
Description: OpenVPN UDP port | |
SSHKeyName: |
View OpenVPNWalkthrough-Part2.yaml
AWSTemplateFormatVersion: '2010-09-09' | |
Description: OpenVPN Stack | |
Parameters: | |
OpenVPNPort: | |
Type: Number | |
Default: 1194 | |
Description: OpenVPN UDP port | |
SSHKeyName: |
View awsCliMfa.sh
#!/bin/bash | |
if [[ $1 -eq 0 ]] ; then | |
echo 'Error Must provide MFA code as param1' | |
exit 0 | |
fi | |
tokenCode=$1 | |
awsAccessKey="" | |
awsSecretKey="" |
View OpenVPNWalkthrough-Part3.yaml
AWSTemplateFormatVersion: '2010-09-09' | |
Description: OpenVPN Stack | |
Parameters: | |
OpenVPNPort: | |
Type: Number | |
Default: 1194 | |
Description: OpenVPN UDP port | |
ClientIPCIDR: |
View simpleVPC
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Simple VPC | |
Parameters: | |
VPCName: | |
Type: String | |
Default: My VPC | |
Description: Name for the VPC | |
Resources: |
View accessPolicyListCharactersDynamoDbCharacterData
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "accessPolicyListCharactersDynamoDbCharacterData", | |
"Effect": "Allow", | |
"Action": [ | |
"dynamodb:GetItem", | |
"dynamodb:GetRecords", | |
"dynamodb:Query" |
View serverlessExample-lambda-listCharacters.js
'use strict'; | |
const AWS = require('aws-sdk'); | |
const dynamoClient = new AWS.DynamoDB.DocumentClient({ | |
region: 'us-east-1' | |
}); | |
function buildResponse(dynamoData) { | |
console.log("dynamoData: " + JSON.stringify(dynamoData)); | |
return dynamoData; | |
} |
View serverlessExample-dynamoDB-table-characterData
Resources: | |
DBLookupTable: | |
Type: "AWS::DynamoDB::Table" | |
Properties: | |
AttributeDefinitions: | |
- | |
AttributeName: "gameId" | |
AttributeType: "S" | |
- | |
AttributeName: "characterName" |
View serverlessExample-dynamoDB-data.json
{ | |
"characters": [{ | |
"gameId": "1", | |
"characterClass": "rogue", | |
"characterName": "tarnug", | |
"intelligence": 12, | |
"level": 50, | |
"strength": 16, | |
"dexterity": 16, | |
"constitution": 12 |
View serverlessExample-lambda-listCharacters-testEvent
{ | |
"body": "{\"testamundo\":\"body\"}", | |
"resource": "/{proxy+}", | |
"requestContext": { | |
"resourceId": "123456", | |
"apiId": "1234567890", | |
"resourcePath": "/{proxy+}", | |
"httpMethod": "POST", | |
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef", | |
"accountId": "123456789012", |
NewerOlder