aws-lambda

Python boto3 - Athena Query - start_query_execution - The security token included in the request is invalid

放肆的年华 提交于 2020-08-06 06:09:05
问题 My code to get Athena Query is self.athenaDataSource = "AwsCatalog" self.athenaDB = "prod_myapp_app" self.athenaResultBucket = "s3://s3-athena-prod-results/" and here i show I create client and call .start_query_execution clientAthena = boto3.client('athena', region_name=awsRegion) athenaQueryExecResp = clientAthena.start_query_execution( QueryString=self.athenaQuery, QueryExecutionContext={ 'Database': self.athenaDB }, ResultConfiguration={'OutputLocation': self.athenaResultBucket } ) print(

Pyppeteer: Browser closed unexpectedly in AWS Lambda

岁酱吖の 提交于 2020-08-05 16:47:00
问题 I'm running into this error in AWS Lambda. It appears that the devtools websocket is not up. Not sure how to fix it. Any ideas? Thanks for your time. Exception originated from get_ws_endpoint() due to websocket response timeout https://github.com/pyppeteer/pyppeteer/blob/ad3a0a7da221a04425cbf0cc92e50e93883b077b/pyppeteer/launcher.py#L225 Lambda code: import os import json import asyncio import logging import boto3 import pyppeteer from pyppeteer import launch logger = logging.getLogger()

Pyppeteer: Browser closed unexpectedly in AWS Lambda

本秂侑毒 提交于 2020-08-05 16:42:27
问题 I'm running into this error in AWS Lambda. It appears that the devtools websocket is not up. Not sure how to fix it. Any ideas? Thanks for your time. Exception originated from get_ws_endpoint() due to websocket response timeout https://github.com/pyppeteer/pyppeteer/blob/ad3a0a7da221a04425cbf0cc92e50e93883b077b/pyppeteer/launcher.py#L225 Lambda code: import os import json import asyncio import logging import boto3 import pyppeteer from pyppeteer import launch logger = logging.getLogger()

Pyppeteer: Browser closed unexpectedly in AWS Lambda

Deadly 提交于 2020-08-05 16:40:34
问题 I'm running into this error in AWS Lambda. It appears that the devtools websocket is not up. Not sure how to fix it. Any ideas? Thanks for your time. Exception originated from get_ws_endpoint() due to websocket response timeout https://github.com/pyppeteer/pyppeteer/blob/ad3a0a7da221a04425cbf0cc92e50e93883b077b/pyppeteer/launcher.py#L225 Lambda code: import os import json import asyncio import logging import boto3 import pyppeteer from pyppeteer import launch logger = logging.getLogger()

How to access AWS CloudFront that connected with S3 Bucket via Bearer token of a specific user (JWT Custom Auth)

做~自己de王妃 提交于 2020-08-05 09:53:07
问题 I am using a serverless framework to deploy a serverless stack to AWS. My stack consists of some lambda functions, DynamoDB tables and API Gateway. I am protected The API Gateway using what's called lambda authorizer. Also, I have a custom standalone self-hosted Auth service that can generate tokens. So the scenario is that the user can request a token from this service (It's IdentityServer4 hosted on Azure) then the user can send a request to the API Gateway with the bearer token so the API

API Gateway GET / PUT large files into S3

橙三吉。 提交于 2020-08-04 05:19:42
问题 Following this AWS documentation, I was able to create a new endpoint on my API Gateway that is able to manipulate files on an S3 repository. The problem I'm having is the file size (AWS having a payload limitation of 10MB). I was wondering, without using a lambda work-around (this link would help with that), would it be possible to upload and get files bigger than 10MB (even as binary if needed) seeing as this is using an S3 service as a proxy - or is the limit regardless? I've tried PUT

API Gateway GET / PUT large files into S3

戏子无情 提交于 2020-08-04 05:19:20
问题 Following this AWS documentation, I was able to create a new endpoint on my API Gateway that is able to manipulate files on an S3 repository. The problem I'm having is the file size (AWS having a payload limitation of 10MB). I was wondering, without using a lambda work-around (this link would help with that), would it be possible to upload and get files bigger than 10MB (even as binary if needed) seeing as this is using an S3 service as a proxy - or is the limit regardless? I've tried PUT

Why can I call an on-VPC aws lambda from an off-VPC aws lambda but not vice versa?

流过昼夜 提交于 2020-08-01 03:20:12
问题 So if I have two lambdas, one inside a private VPC, and one not on a VPC, calling the private lambda from inside the public lambda works but I cant call the public from the private lambda. There's no NAT setup. Why is this? It seems that I should not be able to call the private from the public theoretically. 回答1: In order to trigger a Lambda function, all that's required is for the caller to have outbound access to the Invoke AWS API. It is not necessary for the invoked Lambda function to

{“message”:“Missing Authentication Token”} while accessing lambda through API end point

心已入冬 提交于 2020-07-31 04:21:11
问题 I am able to call the URL end point through POSTMAN which is invoking a lambda function. But when i am trying to use the end point through browser it is giving me bow json object. i feel API gateway is blocking it. I dont have any authorization set for the end point as you can see below {"message":"Missing Authentication Token"} I have this above setting. wondering what is causing this? i have similar lambda integration is "/call" resource which has GET method which is working fine both in

AWS CloudFormation - Create Tables After RDS Instance Is Ready?

匆匆过客 提交于 2020-07-29 12:59:08
问题 CloudFormation amateur here. Been looking online and can't find any references as to how I would go about creating my tables after my RDS instance is stood up through CloudFormation. Is it possible to specify a Lambda to launch and create all the tables, or maybe specify a SQL file to be applied? What's the standard pattern on this? 回答1: There aren't any CloudFormation resources which deal with the 'internals' of an RDS instance once it's been created; it's a black box which you're expected