Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Hey @rgg909090,

    I’m a little confused, you linked to a Gist that uses Access Key ID and Secret Access Key, but as you’re running on EC2 and can attach an IAM Role to the instance, you should be using the Use Server Roles setting:

    define( 'AS3CF_SETTINGS', serialize( array(
        'provider' => 'aws',
        'use-server-roles' => true,
    ) ) );

    https://deliciousbrains.com/wp-offload-media/doc/iam-roles/#ec2

    Have I got things wrong, and you are using server roles via the above use-server-roles setting?

    If so, what are you storing in the instance metadata that relates to WP Offload Media?

    -IJ

    Thread Starter rgg909090

    (@rgg909090)

    I pasted the wrong link, thanks for pointing it out! Yes, we are using the configuration defined here: https://deliciousbrains.com/wp-offload-media/doc/iam-roles/#ec2

    So the plugin works perfectly fine with instance metadata version 1. We have had this running for a while and haven’t faced any issue so fare. However, when we use instance metadata version 2, the plugin seems unable to retrieve the information.

    So what we need help figuring out is how does the plugin retrieve the instance role and how to configure it with instance metadata version 2.

    Thanks! ??

    Plugin Author Delicious Brains

    (@deliciousbrains)

    The version of the AWS PHP SDK (v3.279.0) that is embedded in WP Offload Media v3.2.5 should work fine with IMDSv2, and from what I can tell uses that by default.

    You should not need to set up any cURL calls etc, when using server roles the SDK’s credentials provider should internally set up the IMDSv2 session token and retrieve the metadata as required.

    However, when we use instance metadata version 2, the plugin seems unable to retrieve the information.

    1. Please supply details of the errors you see, ideally debug.log entries.
    2. Please confirm what version of WP Offload Media you’re using.
    3. Please post Diagnostic Info from WP Offload Media’s Support tab. (if you’re not comfortable with this, and have a license, please submit a support request via the plugin’s Support tab linking to this support request and mentioning Ian Jones asked for Diagnostic Info)

    -IJ

    Thread Starter rgg909090

    (@rgg909090)

    Hey there! Sorry for the delay. I checked back with the team, and the issue was on the plugin version we were using. We had been using version 2.3.2; after upgrading the version it worked just fine with instance metadata service v2. Thanks for your help!

    Plugin Author Delicious Brains

    (@deliciousbrains)

    That’s great to hear, thanks for letting us know.

    -IJ

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP Offload Media with IMDSV2’ is closed to new replies.