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
--- | |
Description: AWS AppSync Notes API | |
Parameters: | |
APIName: | |
Type: String | |
Description: Name of the API - used to generate unique names for resources | |
MinLength: 3 | |
MaxLength: 20 | |
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$' |
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 elasticsearch = require('elasticsearch'); | |
const esClient = new elasticsearch.Client({ | |
host: process.env.ES_ENDPOINT, | |
apiVersion: "7.1", | |
}); | |
exports.handler = async (event, context, callback) => { | |
const indexName = 'notifications'; | |
const id = event.input.id; | |
const documents = event.input; |
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' | |
Description: Simple S3 Bucket with SNS Trigger | |
Parameters: | |
BucketName: | |
Type: String | |
Description: The name of the S3 Bucket to create |
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
acm.amazonaws.com | |
alexa-appkit.amazon.com | |
apigateway.amazonaws.com | |
application-autoscaling.amazonaws.com | |
appstream.application-autoscaling.amazonaws.com | |
appsync.amazonaws.com | |
athena.amazonaws.com | |
autoscaling.amazonaws.com | |
batch.amazonaws.com | |
channels.lex.amazonaws.com |
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' | |
Description: Sample template that contains a Lambda function behind an API GW | |
Resources: | |
# BEGIN: Should only need this in an empty API Gateway situation | |
ApiGatewayCloudWatchLogsRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' |
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 AWS = require("aws-sdk"); | |
const s3 = new AWS.S3({ apiVersion: "2006-03-01" }); | |
const fs = require("fs"); | |
AWS.config.update({ | |
accessKeyId: "", | |
secretAccessKey: "", | |
region: "ap-southeast-1", | |
Bucket: "mobile-ayaplus-backend-dev", | |
}) |
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
version: "3" | |
networks: | |
kong-net: | |
driver: bridge | |
services: | |
####################################### | |
# Postgres: The database used by Kong |
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 S3 bucket for static hosting | |
resource "aws_s3_bucket" "website" { | |
bucket = "${var.website_bucket_name}" | |
acl = "public-read" | |
tags { | |
Name = "Website" | |
Environment = "production" | |
} |
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
resource "aws_iam_role" "firehose_role" { | |
name = "firehose_es_delivery_role" | |
assume_role_policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "sts:AssumeRole", | |
"Principal": { |
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
variable "resources" { | |
description = "My Dashboard" | |
type = list(object({ | |
bu = string | |
title = string | |
query = list(string) | |
})) | |
} |