Giter Site home page Giter Site logo

Comments (4)

sanathkr avatar sanathkr commented on May 22, 2024

Ah, so region is not being passed to docker somehow. How are you configuring your AWS credentials?

from aws-sam-cli.

MCLDG-zz avatar MCLDG-zz commented on May 22, 2024

I've tried it with 2 credentials: one with a default region, one without. Result is the same.

$ aws configure
AWS Access Key ID [****************etc]: 
AWS Secret Access Key [****************etc]: 
Default region name [us-east-1]: 
Default output format [None]: 

Error is:

Invalid endpoint: https://dynamodb..amazonaws.com: ValueError
Traceback (most recent call last):
  File "/var/task/calc-airmile-lambda.py", line 36, in handler
    dynamodb = boto3.resource('dynamodb' )
  File "/var/runtime/boto3/__init__.py", line 92, in resource
    return _get_default_session().resource(*args, **kwargs)
  File "/var/runtime/boto3/session.py", line 389, in resource
    aws_session_token=aws_session_token, config=config)
  File "/var/runtime/boto3/session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "/var/runtime/botocore/session.py", line 836, in create_client
    client_config=config, api_version=api_version)
  File "/var/runtime/botocore/client.py", line 71, in create_client
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/var/runtime/botocore/client.py", line 281, in _get_client_args
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/var/runtime/botocore/args.py", line 79, in get_client_args
    timeout=(new_config.connect_timeout, new_config.read_timeout))
  File "/var/runtime/botocore/endpoint.py", line 273, in create_endpoint
    raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: https://dynamodb..amazonaws.com

from aws-sam-cli.

sanathkr avatar sanathkr commented on May 22, 2024

I just tried with nodejs and python. I get AWS_REGION and AWS_DEFAULT_REGION populated with nodejs4.3 runtime, but not with python2.7.

As a workaround, can you set region when you call sam local?
Ex: AWS_REGION=us-east-1 sam local start-api

I will continue to dig into the problem

from aws-sam-cli.

nitzien avatar nitzien commented on May 22, 2024

Workaround worked for me.

from aws-sam-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.