Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7637629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:59:24+00:00 2026-05-31T07:59:24+00:00

I’ve gotten Amazon SDK to work well with Symfony2 . It involves loading the

  • 0

I’ve gotten Amazon SDK to work well with Symfony2. It involves loading the sdk.class.php right into the autoload.php. I’m not sure if this is best, but it seems be.

But my main problem is loading the Credentials. Amazon wants you too.. edit the config.inc.php and put it either in the vendor directory OR in the HOME. Option 1 isnt good because it involves modifying a Repo which would get overwritten on updates and HOME doesn’t work because it’s outside my project directory.

What I’m doing now, inside autoload.php is loading the sdk.class.php and then running CFCredentionals:set(array()); .. my code is below. Normally I’d want to do a Dependency Injection or use Parameters.. but I can’t figure out any other way to get the Credentials loaded. Also, I don’t want to load them when I instantiate the Services. like $e3 = new AmazonE3(array($a,$s));. It’s so much cleaner and stream lined to have the credentials pre-loaded so you can just use $e3 = new AmazonE3();

So this is what works — but there’s got to be a better way

 require_once __DIR__. '../../vendor/AmazonPHPSDK/sdk.class.php';
    CFCredentials::set(array(
       '@default' => array(
            'key' => '1dfXXXXXXXXXXXXXXXXXXXXXZ82',
            'secret' => '8tCXXXXXXXXXXXXXXXXXXXXXXfjB+Q',
            'default_cache_config' => 'apc',
             'certificate_authority' => false
        )));

There’s nothing wrong with how Amazon wants us to load the credentials. It just just doesn’t seem to go well with the Symfony2 framework. Having an Array with Access Credentials in the autoload.php just doesn’t seem right.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:59:25+00:00Added an answer on May 31, 2026 at 7:59 am

    Why not use something like the AmazonWebServicesBundle which looks like it allows configuration via parameters.ini or config.yml?


    The documentation for this is here-link . Currently, the steps to set the credentials via parameters.ini OR config.yml are in step 6 and it looks something like this..

    // app/config/parameters.ini
    [parameters]
        ...
    
        ; Amazon Web Services Configuration. Found in the AWS Security Credentials.
        aws_key                        = YOUR_KEY
        aws_secret                     = YOUR_SECRET_KEY
        aws_account_id                 = YOUR_ACCOUNT_ID
        aws_canonical_id               = YOUR_CONONICAL_ID
        aws_canonical_name             = YOUR_CONONICAL_NAME
        aws_mfa_serial                 = YOUR_MFA_SERIAL
        aws_cloudfront_keypair_id      = YOUR_CLOUDFRONT_KEYPAIR_ID
        aws_cloudfront_private_key_pem = YOUR_CLOUDFRONT_PRIVATE_KEY_PEM
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I used javascript for loading a picture on my website depending on which small
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.