In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):
- Add
ptvsd
to your requirements.txt file
ptvsd == 4.3.2
- To your
launch.json
, add this:
# AWS S3 bucket for static hosting | |
resource "aws_s3_bucket" "website" { | |
bucket = "${var.website_bucket_name}" | |
acl = "public-read" | |
tags { | |
Name = "Website" | |
Environment = "production" | |
} |
AWSTemplateFormatVersion: "2010-09-09" | |
Parameters: | |
Subnet1ID: | |
Type: String | |
Subnet2ID: | |
Type: String | |
VPCID: | |
Type: String | |
Resources: | |
Cluster: |
"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(); |
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/`; |
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) { |
#!/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 |