Giter Site home page Giter Site logo

dynamo_migration's Introduction

dynamo_migration's People

Contributors

tashirosota avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dynamo_migration's Issues

Mix tasks failing

The mix dynamo.setup task is failing with this message

** (ArgumentError) errors were found at the given arguments:

  * 1st argument: the table identifier does not refer to an existing ETS table

    (stdlib 4.1) :ets.lookup_element(:hackney_config, :mod_metrics, 2)
    /Users/drewble/Sites/permiso/deps/hackney/src/hackney_metrics.erl:27: :hackney_metrics.get_engine/0
    /Users/drewble/Sites/permiso/deps/hackney/src/hackney_connect.erl:75: :hackney_connect.create_connection/5
    /Users/drewble/Sites/permiso/deps/hackney/src/hackney_connect.erl:44: :hackney_connect.connect/5
    /Users/drewble/Sites/permiso/deps/hackney/src/hackney.erl:335: :hackney.request/5
    (ex_aws 2.4.1) lib/ex_aws/request/hackney.ex:21: ExAws.Request.Hackney.request/5
    (ex_aws 2.4.1) lib/ex_aws/request.ex:102: anonymous fn/6 in ExAws.Request.do_request/7
    (telemetry 1.2.1) /Users/drewble/Sites/permiso/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3

The solution seems to be to execute the following, as the app is not started by default in the mix environment.

    Application.ensure_all_started(:ex_aws)
    Application.ensure_all_started(:hackney)

However, even with those applications started mix dynamo.setup fails with this error.

** (ExAws.Error) ExAws Request Error!

{:error, {"UnrecognizedClientException", "The security token included in the request is invalid."}}

    (ex_aws 2.4.1) lib/ex_aws.ex:90: ExAws.request!/2
    lib/dynamo_migration.ex:167: DynamoMigration.table_names/0
    lib/dynamo_migration.ex:68: DynamoMigration.setup/0
    (mix 1.14.0) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
    (mix 1.14.0) lib/mix/cli.ex:84: Mix.CLI.run_task/2

I have my AWS credentials configured, and if I run iex -S mix and then execute the following, I get the expected response.

ExAws.Dynamo.list_tables()
|> ExAws.request!()

Similarly, if I run DynamoMigration.setup() in an iex session, the migrations table is created.

Do these mix commands work for you? Is there some setup missing from the README?

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.