- edited description
Specified region is ignored when a Lamda function is created and invoked
Issue #48
resolved
I tried to add a lamda function in ap-northeast-1, but the function is always created in us-east-1. This is an issue when I want to explicitly invoke a function is specified region.
$ aws configure
AWS Access Key ID [****************RQTA]:
AWS Secret Access Key [****************IZoa]:
Default region name [ap-northeast-1]:
Default output format [json]:
$ aws \
--endpoint-url=http://localhost:4574 \
lambda create-function \
--region ap-northeast-1 \
--function-name helloworld \
--zip-file fileb://`pwd`/helloworld.zip \
--role r1 \
--handler helloworld.handler \
--runtime nodejs6.10
The function is created in us-east-1.
$ aws \
--endpoint-url=http://localhost:4574 \
lambda list-functions
{
"Functions": [
{
"FunctionName": "helloworld",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:helloworld",
"Runtime": "nodejs6.10",
"Handler": "helloworld.handler",
"Timeout": 60,
"Version": "$LATEST"
}
]
}
Even if I specified ap-northeast-1 when I invoke the function, the functin is executed.
$ aws --endpoint-url=http://localhost:4574 lambda invoke --invocation-type RequestResponse --function-name helloworld --region ap-northeast-1 --payload '{"key1":"value1", "key2":"value2", "key3":"value3"}' outputfile.txt
{
"StatusCode": 200
}
$ cat outputfile.txt
START RequestId: 48b8dd3a-224f-1413-e40c-f11e37bf9275 Version: $LATEST
2017-07-05T05:23:59.893Z 48b8dd3a-224f-1413-e40c-f11e37bf9275 Loading function
2017-07-05T05:23:59.894Z 48b8dd3a-224f-1413-e40c-f11e37bf9275 value1 = value1
2017-07-05T05:23:59.894Z 48b8dd3a-224f-1413-e40c-f11e37bf9275 value2 = value2
2017-07-05T05:23:59.894Z 48b8dd3a-224f-1413-e40c-f11e37bf9275 value3 = value3
END RequestId: 48b8dd3a-224f-1413-e40c-f11e37bf9275
REPORT RequestId: 48b8dd3a-224f-1413-e40c-f11e37bf9275 Duration: 4.38 ms Billed Duration: 100 ms Memory Size: 1536 MB Max Memory Used: 29 MB
Comments (3)
-
reporter -
Account Deactivated Thanks for reporting @yoheio . This issue is now tracked in a new location: https://github.com/localstack/localstack/issues/167 . Please follow up and share your questions/experiences on the new issue. Thanks
-
Account Deactivated - changed status to resolved
- Log in to comment