WP Offload Media with IMDSV2
-
Hi there!
We are trying to run a simple WP site, that uses the Plugin of WP Offload Media. The site is running on an EC2 instance with instance metadata service version 1, and connects to a S3 bucket. Currently the plugin is configured to use the EC2 instance role. For sec reasons, we need to implement instance metadata service version 2, which requires a previous call to retrieve a token and then a call to the metadata endpoint.
with IMDV1:curl https://169.254.169.254/latest/meta-data/
with IMDV2:
TOKEN=curl -X PUT “https://169.254.169.254/latest/api/token” -H “X-aws-ec2-metadata-token-ttl-seconds: 21600” \
&& curl -H “X-aws-ec2-metadata-token: $TOKEN” -v https://169.254.169.254/latest/meta-data/Doc here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html
We have been trying to sort this out but we weren’t able; any insight on this? The creation of a user for this purposes isn’t approved, so we need to use ec2 instance role.Thanks!
- The topic ‘WP Offload Media with IMDSV2’ is closed to new replies.