0

In Airflow I have 2 tasks defined that run every day:

  • the first one creates a zip file and saves it in AWS under s3://{bucket-name}/foo/bar/{date}/archive.zip
  • the second one pre-signs that url (should expire in 7 days) and sends it to Slack.

Because Qubole uses an IAM role the generated url will expire when the keys are rotated (less than 24 hours as far as I can tell).

I'm trying to find a solution for this. My current idea is moving the second task into an AWS lambda and using IAM user credentials to avoid the expiry issue.

Is there any other approach I could take without over complicating it?

Maria Livia
  • 75
  • 1
  • 9
  • Wanted to follow up and see if you had come up with any solution for this? We want to move properly restricted rotating IAM roles but for now want to keep backwards compatibility with some permanently-cached presigned URLs that we currently have. We are considering Lambda as well. – scorgn Oct 28 '22 at 18:34

1 Answers1

1

You will need to use specific IAM credentials. Best practice would be be setting the permissions on the IAM user to only do what is required.

Chris Williams
  • 32,215
  • 4
  • 30
  • 68