Kubernetes: how to set VolumeMount user group and file permissions

The Pod Security Context supports setting an fsGroup, which allows you to set the group ID that owns the volume, and thus who can write to it. The example in the docs: apiVersion: v1 kind: Pod metadata: name: hello-world spec: containers: # specification of the pod’s containers # … securityContext: fsGroup: 1234 More info on … Read more

Amazon S3 direct file upload from client browser – private key disclosure

I think what you want is Browser-Based Uploads Using POST. Basically, you do need server-side code, but all it does is generate signed policies. Once the client-side code has the signed policy, it can upload using POST directly to S3 without the data going through your server. Here’s the official doc links: Diagram: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html Example … Read more

API Gateway CORS: no ‘Access-Control-Allow-Origin’ header

I get the same problem. I have used 10hrs to findout. https://serverless.com/framework/docs/providers/aws/events/apigateway/ // handler.js ‘use strict’; module.exports.hello = function(event, context, callback) { const response = { statusCode: 200, headers: { “Access-Control-Allow-Origin” : “*”, // Required for CORS support to work “Access-Control-Allow-Credentials” : true // Required for cookies, authorization headers with HTTPS }, body: JSON.stringify({ “message”: … Read more

AWS lambda invoke not calling another lambda function – Node.js

Note I will denote by executor the lambda that executes the second lambda. Why Timeout? Since the executor is “locked” behind a VPC – all internet communications are blocked. That results in any http(s) calls to be timed out as they request packet never gets to the destination. That is why all actions done by … Read more