Testing for S3 RequestTimeTooSkewed error | Ottomatik

Testing for S3 RequestTimeTooSkewed error

Set the identity of the server to check

From the salt-master

identity={server-identity}

CMD to look at S3 date (first) and local date (second) to see difference

salt "${identity}" cmd.run "curl http://s3.amazonaws.com -v 2>&1 | grep -E -i -w '< Date:' | awk '/<\sDate:\s/ { gsub(/<\sDate:\s/, \"\") }; { print }'" && salt "${identity}" cmd.run 'date -u +%a,\ %e\ %b\ %Y\ %T\ %Z'

CMD to run to see if we get a (RequestTimeTooSkewed) error

salt "${identity}" cmd.run 'export AWS_ACCESS_KEY_ID=AKIAJEBQ4AEFLNMPUB4A; export AWS_SECRET_ACCESS_KEY=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; export AWS_DEFAULT_REGION=us-east-1; aws s3 ls s3://ottomatik-test-us-std'

Solution

How to Fix Amazon S3 RequestTimeTooSkewed