Skip to content

secret_access_key must be a string, but instead is [{:awscli, :system, 30}] #919

@andrejj

Description

@andrejj

Environment

  • Elixir & Erlang versions (elixir --version): Elixir 1.14.2 (compiled with Erlang/OTP 24)
  • ExAws version mix deps | grep ex_aws
* ex_aws 2.4.1 (Hex package) (mix)
  locked at 2.4.1 (ex_aws) 803387db
* ex_aws_s3 2.3.3 (Hex package) (mix)
  locked at 2.3.3 (ex_aws_s3) 0044f0b6
* ex_aws_ssm 2.1.0 (Hex package) (mix)
  locked at 2.1.0 (ex_aws_ssm) a91a183d
* ex_aws_sts 2.3.0 (Hex package) (mix)
  locked at 2.3.0 (ex_aws_sts) f14e4c7d
  • HTTP client version. IE for hackney do mix deps | grep hackney
* hackney 1.18.1 (Hex package) (rebar3)
  locked at 1.18.1 (hackney) a4ecdaff

Current behavior

I'm trying to initialize the app by puling config parameters from SSM.
locally it works.
The problem is it doesn't work when I push the docker image to ECS.
When fetching data from SSM I get: "Required key: :secret_access_key must be a string, but instead is [{:awscli, :system, 30}]"

Config

config :ex_aws,
  secret_access_key: [{:awscli, :system, 30}],
  access_key_id: [{:awscli, :system, 30}],
  awscli_auth_adapter: ExAws.STS.AuthCache.AssumeRoleCredentialsAdapter

The docker_entrypoint script creates ~/.aws/config, before starting the application.

export AWS_PROFILE=role_spec
[profile role_spec]
  credential_source = Ec2InstanceMetadata
  role_arn = $AWS_ROLE_ARN

Expected behavior

I would expect the above file to initialize ex_aws correctly. I've seen it work with node's sdk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions