$ docker
This file contains hidden or 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 | |
| # ddb_lsi_example: A sample program to show how to use Local Secondary Indexes | |
| # in DynamoDB, using Python and boto3. | |
| # | |
| # Copyright 2016 Parijat Mishra | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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 { Handler, Context } from 'aws-lambda'; | |
| import { NestFactory } from '@nestjs/core'; | |
| import { AppModule } from './app.module'; | |
| import { INestApplication } from '@nestjs/common'; | |
| import { SqsHandlerService } from './queue/sqs.handler.service'; | |
| let cachedServer: INestApplication; | |
| async function bootstrapServer(): Promise<INestApplication> { | |
| if (!cachedServer) { |
This file contains hidden or 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 AWS from 'aws-sdk'; | |
| import { Logger } from '@nestjs/common'; | |
| import { QueueInterface } from '../interfaces/queue.interface'; | |
| import { ConfigService } from '@nestjs/config'; | |
| import { Repository } from 'typeorm'; | |
| import { QueueEntity } from '../entities/queue.entity'; | |
| export const sqsService = new AWS.SQS({ region: 'us-east-1' }); | |
| export const QUEUE_URL = `https://sqs.us-east-1.amazonaws.com/account_id/`; |
This file contains hidden or 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"; | |
| var AWS = require("aws-sdk"); | |
| AWS.config.update({ | |
| region: process.env.AWS_DEFAULT_REGION || AWS.config.region || "us-east-1" | |
| }); | |
| var dynamodb = new AWS.DynamoDB(); |
This file contains hidden or 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" | |
| Parameters: | |
| Subnet1ID: | |
| Type: String | |
| Subnet2ID: | |
| Type: String | |
| VPCID: | |
| Type: String | |
| Resources: | |
| Cluster: |
This file contains hidden or 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" | |
| } |