symfony - Error retrieving credentials from the instance profile metadata server. Network unreachable -


i have following adapter , service configured:

knp_gaufrette:     adapters:         sc_documents:             aws_s3:                 service_id: sc.aws_s3.client                 bucket_name:  hidden                 options:                     directory: documents                     create: true     filesystems:         sc_documents_fs:             adapter:    sc_documents             alias:  sc_document_storage  sc.aws_s3.client:     class: aws\s3\s3client     factory_class: aws\s3\s3client     factory_method: factory     arguments:         -             key: 'hidden'             secret: 'hidden'             region: 'eu-central-1'             version: '2006-03-01' 

i keep getting following error both read , write: error retrieving credentials instance profile metadata server. (curl error 7: failed connect 169.254.169.254 port 80: network unreachable (see http://curl.haxx.se/libcurl/c/libcurl-errors.html))

the bucket policy is:

"id": "policy1445959171046",     "version": "2012-10-17",     "statement": [         {             "sid": "stmt",             "action": "s3:*",             "effect": "allow",             "resource": "arn:aws:s3:::hidden/*",             "principal": {                 "aws": "*"             }         }     ] 

i tried different accounts none of them worked. wonder doing wrong. need else enabled?

thanks!

it's problem change of how credentials managed in latest version of php sdk. use credentials object.

if using aws/aws-sdk-php-symfony bundle there's no need create s3_client service.

initialize sdk in config with

aws:     version: latest     region: us-east-1     credentials:         key: not-a-real-key         secret: "@@not-a-real-secret"      s3:         version: '2006-03-01' 

and pass aws.s3 client gaufrette instead of declared client

knp_gaufrette:     adapters:         sc_documents:             aws_s3:                 service_id: aws.s3                 bucket_name:  hidden                 options:                     directory: documents                     create: true 

Comments

Popular posts from this blog

r - how do you merge two data frames the best way? -

How to debug "expected android.widget.TextView but found java.lang.string" in Android? -

php - mySQL problems with this code? -