View template.yaml
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" | |
Resources: | |
LogGroup: | |
Type: AWS::Logs::LogGroup | |
Properties: | |
LogGroupName: !Sub /aws/lambda/${StackCreatedFunction} | |
RetentionInDays: 7 |
View index.js
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
const AWSXRay = require('aws-xray-sdk') | |
AWSXRay.setLogger(console) | |
/** | |
* Lambda handler | |
*/ | |
exports.handler = async (event) => { | |
console.log(JSON.stringify(event)) |
View useEvents.js
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
const eventBus = new Comment('global-event-bus'); | |
const listeners = {}; | |
export const EVENT_NAME = 'MyEventName'; | |
export default function () { | |
/** | |
* @param {string} event | |
* @param {function} callback | |
* @returns {number} index |
View template.yml
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 | |
# Template Information | |
Description: "Personal Website Deploy Pipeline" | |
# Template Parameters |
View template.yml
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 | |
# Template Information | |
Description: "Personal Website" | |
# Template Parameters |
View template.yml
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 | |
# Template Information | |
Description: "Website redirect" | |
# Template Parameters |
View lambda.js
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
const axios = require('axios') | |
/** | |
* AWS clients | |
*/ | |
const SSM = require('aws-sdk/clients/ssm') | |
const ssm = new SSM() | |
/** | |
* Lambda handler |
View App.vue
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
<template> | |
<div id="app"> | |
<!-- get page data --> | |
<vs-rich-text :document="doc" /> | |
</div> | |
</template> |
View abstract.js
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
const DynamoDB = require('aws-sdk/clients/dynamodb') | |
const documentClient = new DynamoDB.DocumentClient({ | |
apiVersion: '2012-08-10', | |
// logger: console | |
}) | |
module.exports = class Model { | |
/** | |
* Model constructor |
NewerOlder