@Hunger_Artist_twitter I got it almost done... can you please check just one more thing for me. Do you have access to this policy:
aws iam get-policy --policy-arn 'arn:aws:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole'
if not, if there an equivalent policy in your partition?
@gojko This is pretty interesting. Running the command aws iam get-policy --policy-arn 'arn:aws:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole'
returns:
{
"Policy": {
"PolicyName": "AWSLambdaKinesisExecutionRole",
"PolicyId": "AN...",
"Arn": "arn:aws-us-gov:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole",
"Path": "/service-role/",
"DefaultVersionId": "v2",
"AttachmentCount": 0,
"IsAttachable": true,
"Description": "Provides list and ead access to Kinesis streams and write permissions to CloudWatch logs.",
"CreateDate": "2017-05-08T18:26:34Z",
"UpdateDate": "2018-11-19T20:09:32Z"
}
}
Running the above with --debug
outputs the following request line:
2019-08-28 00:36:43,518 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=GetPolicy) (verify_ssl=True) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'User-Agent': 'aws-cli/1.14.44 Python/3.6.8 Linux/4.15.0-1044-aws botocore/1.8.48'}, 'body': {'Action': 'GetPolicy', 'Version': '2010-05-08', 'PolicyArn': 'arn:aws:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole'}, 'url': 'https://iam.us-gov.amazonaws.com/', 'context': {'client_region': 'aws-us-gov-global', 'client_config': <botocore.config.Config object at 0x7f7cc158e860>, 'has_streaming_input': False, 'auth_type': None}}
So when the request is made to a us-gov AWS endpoint, even though the request has the aws
partition, the response arn has the aws-us-gov
partition.
Also - there's a typo in the Description
response field.... could report to AWS
@gojko - Thanks, will try out that version before the end of the day (I'm in the eastern US timezone).
Does this version address the discrepancy between the AWS_REGION
envvar and the --region
command-line parameter mentioned here? :
:point_up: August 23, 2019 12:18 AM
I am using Claudia API Builder.
The endpoint that I created when hit 20 times at the same time produces the following error.
ThrottlingException: Rate exceeded
I basically have a for loop that loops over 20 times and in each loop it calls the Claudia API Endpoint.
I do not have throttling enabled for API Gateway so it should be like the following.Your current account level throttling rate is 10000 requests per second with a burst of 5000 requests
So I don't get why I get this error
claudia pack
instead of deploying to experiment faster
I have a question, I'm getting a lot of server error response in Amazon gateway and when I check what happened I got the error
errorMessage": "2019-09-18T02:13:13.370Z 7d4003d4-240c-450a-a6c6-45a6f63b5ecf Task timed out after 3.00 seconds"
So, I look for the function result and it ran successfully and also checked to see any answers in stack overflow, I got a response telling me to return the success using the amazn context, so, how can I achieve this from a async await returned from a controller to the claudia routes?
Promise
somewhere that doesn't resolve, or if you use some library that requires callbacks and is not turned into promises correctly.--timeout
). For complex tasks, you can give it a better CPU by increasing memory (CPU cores get allocated proportionally, giving your function 1.5G gives it a whole core). By default, your function only gets 128MB I think, check the lambda docs, so it will get only about 1/10 of a CPU core. You can increase available memory by updating using --memory
. Check out https://github.com/claudiajs/claudia/blob/master/docs/update.md for more info on those options