Skip to content

Region when called lambda functions ... #332

Closed

Description

@dbbgb

I am trying to call a lambda function.

user configuration file:

[default]
region = us-west-2

ARN:
arn:aws:lambda:us-west-2:468131460318:function:sct_mail_20161103144602

I use the following code:

...
Aws::SDKOptions options;
Aws::InitAPI(options);	
LambdaClient client;
InvokeRequest invokeRequest;
invokeRequest.SetFunctionName("arn:aws:lambda:us-west-2:468131460318:function:sct_mail_20161103144602");
invokeRequest.SetInvocationType(InvocationType::RequestResponse);
InvokeOutcome invokeOutcome = client.Invoke(invokeRequest);
...

I receive an error:
Functions from 'us-west-2' are not reachable in this region ('us-east-1')

Region which is specified in the configuration is not used when working with lambda?
How to use region settings from config file?

EC2 instance, Amazon Linux, AWS_SDK_VERSION_STRING "1.0.24"

Thanks!

Activity

  1. JonathanHenson commented on Nov 15, 2016

    @JonathanHenson
    Contributor

    You need to set the client configuration in your LambdaClient constructor. See Aws::Client::ClientConfiguration. If you want to load the config from your profile config file or from EC2 Metadata service, see: https://sdk.amazonaws.com/cpp/api/LATEST/class_aws_1_1_config_1_1_a_w_s_profile_config_loader.html

  2. added
    help wanted
    and removed on Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions