Lambda reserved concurrency (#3215)
* lambda-responses: add method to dispatch concurrency calls * lambda-resources: add route to handle concurrency requests * lambda-model: implement put_function_concurrency and concurrency attribute * put-concurrency-tests: add one simple test * get_function: add concurrency entry - with test * lambda-reserved-concurrency: cloudformation support * lambda-concurrency: implement delete_reserved with tests * lambda-concurrency: implement get_reserved with tests * lint * implementation-cov: mark delete_function_concurrency, put_function_concurrency and get_function_concurrency * botocore doesn't display concurrency entry for lambdas without it * lambda(refactor): improvements on response's handler
This commit is contained in:
parent
47a227921d
commit
f744356da7
6 changed files with 170 additions and 8 deletions
|
|
@ -1777,6 +1777,7 @@ def lambda_handler(event, context):
|
|||
"Role": {"Fn::GetAtt": ["MyRole", "Arn"]},
|
||||
"Runtime": "python2.7",
|
||||
"Environment": {"Variables": {"TEST_ENV_KEY": "test-env-val"}},
|
||||
"ReservedConcurrentExecutions": 10,
|
||||
},
|
||||
},
|
||||
"MyRole": {
|
||||
|
|
@ -1811,6 +1812,11 @@ def lambda_handler(event, context):
|
|||
{"Variables": {"TEST_ENV_KEY": "test-env-val"}}
|
||||
)
|
||||
|
||||
function_name = result["Functions"][0]["FunctionName"]
|
||||
result = conn.get_function(FunctionName=function_name)
|
||||
|
||||
result["Concurrency"]["ReservedConcurrentExecutions"].should.equal(10)
|
||||
|
||||
|
||||
@mock_cloudformation
|
||||
@mock_ec2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue