-1

Pretty simple question but I can't find any online resources to clarify if it is possible to do this. I want to transfer data from WinSCP to an S3 bucket in an Amazon environment but instead of creating an IAM user with an IAM policy I want to utilize SSH.

The reasoning behind using this method is to bypass the new AWS requirement that requires IAM credentials to be rotated every 90 days. Any insight would be much appreciated.

  • Are you aware of S3 SFTP transfer service? Anyway, this is not a [programming question](https://stackoverflow.com/help/on-topic). Please ask it at [su], you might be more useful answers there. – Martin Prikryl Sep 28 '21 at 17:18
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 07 '21 at 16:41

1 Answers1

0

It can't be done. AWS S3 doesn't speak SSH. Its requests must be signed by the AWS Signature process, which uses IAM key, secret, and session token.

If your s3 action is running on an EC2 instance, you can use an instance profile to provide short term access credentials for your application. Same for ecs including fargate and lambda.

If you're running the script as a human user, you can use aws sso or IAM federation to move from long lived access keys to short lived credentials.

Or, you could use something like code pipeline to automatically operate on your behalf based on changes coming from version control like Github, which would remove your need for AWS access credentials, instead delegating that access to code pipeline or something in AWS. Hard to say much about that option without knowing more about your use case.

Otherwise, you're stuck handling the credentials. And in my humble opinion, you should consider that 90 day rotation an acceptable cost for the security it provides.

The reasoning behind using this method is to bypass the new AWS requirement that requires IAM credentials to be rotated every 90 days

This sounds like a requirement your account imposes itself - and a good one. I'm not aware of any such requirement being imposed by AWS. Can you provide a source for your assertion?

erik258
  • 14,701
  • 2
  • 25
  • 31
  • 1
    Thank you @Daniel Farrell! I'll try a variety of those options and good catch on the rotation blocker. That is something that the account imposes upon itself and is somewhat of a non-negotiable. I appreciate the assistance and will update on the path I can consolidate to moving forward. – Ethan Toth Sep 28 '21 at 17:28