Skip to content

Instantly share code, notes, and snippets.

View atlascoder's full-sized avatar

AtlasCoder atlascoder

View GitHub Profile
@atlascoder
atlascoder / query-local-secondary-index.vtl
Created April 26, 2021 20:45 — forked from koingdev/query-local-secondary-index.vtl
Sample AppSync Resolver for Query Local Secondary Index
## REQUEST MAPPING
{
"version" : "2017-02-28",
"operation" : "Query",
"index": "shopID-vendorID-index",
"query" : {
"expression": "shopID = :shopID AND vendorID = :vendorID",
"expressionValues" : {
":shopID" : $util.dynamodb.toDynamoDBJson($ctx.args.shopID),
":vendorID" : $util.dynamodb.toDynamoDBJson($ctx.args.vendorID)
@plindberg
plindberg / README.md
Created August 5, 2017 16:46
How to set up an AWS Lambda function for returning S3 pre-signed URLs for uploading files.

README

Granted, this is little more than an obfuscated way of having a publicly writable S3 bucket, but if you don’t have a server which can pre-sign URLs for you, this might be an acceptable solution.

For this to work, you take the following steps:

  1. Create a Lambda func, along with a new IAM role, keeping the default code.
  2. Create an API in the API Gateway.