GithubHelp home page GithubHelp logo

how do you use IAM roles about aws-sdk-php-symfony HOT 6 OPEN

aws avatar aws commented on May 30, 2024
how do you use IAM roles

from aws-sdk-php-symfony.

Comments (6)

RRcwhiting avatar RRcwhiting commented on May 30, 2024 1

so, the SDK standard is that you shouldn't need to set anything, and it will use the instance credentials instead.
https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/hello.html (notice how they don't set the credentials when they make the new client)

I'm guessing that process is to set the credentials as null or ~, and there's a bug somewhere.

from aws-sdk-php-symfony.

RRcwhiting avatar RRcwhiting commented on May 30, 2024 1

@yenfryherrerafeliz documentation clarification on the readme, I suppose.

from aws-sdk-php-symfony.

kaznovac avatar kaznovac commented on May 30, 2024

Cannot autowire service "App\Service\Aws": argument "$access_key" of method "__construct()" has no type-hint, you should configure its value explicitly.

this is related to instantiation of your App\Services\Aws service not the AwsSdk bundle

please check the $access_key and set it in the services DI

from aws-sdk-php-symfony.

kaznovac avatar kaznovac commented on May 30, 2024

Yes, but please note that you need to leave out the credentials array entirely, otherwise it will try to use the given data (regardless of being null)

If you want to know more about the Credential load process you can start from this method:
https://github.com/aws/aws-sdk-php/blob/881b76be0af3324655119799ed33f39adb799a12/src/Credentials/CredentialProvider.php#L55-L140

from aws-sdk-php-symfony.

yenfryherrerafeliz avatar yenfryherrerafeliz commented on May 30, 2024

Hi @kaznovac, @RRcwhiting if you do not set any credentials then, the SDK will do the default resolution, which if running on ECS or EC2 will probably end up using either Aws\Credentials\CredentialProvider::ecs or Aws\Credentials\CredentialProvider::instanceProfile credential provider, so I am not sure what is the reported issue here. Can you please elaborate more so we can better assist you?

Thanks!

from aws-sdk-php-symfony.

yenfryherrerafeliz avatar yenfryherrerafeliz commented on May 30, 2024

@RRcwhiting, I understand now. Yeah, I agree. I will mark this issue with a needs-review label so we can further address this.

Thanks!

from aws-sdk-php-symfony.

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.