Patrick Tan
06/01/2022, 8:05 PMwith Flow("LiveLots-ETL-Parent", storage=S3(bucket=config_bucket,
client_options={
"aws_access_key_id":aws_access_key_id,
"aws_secret_access_key":aws_secret_access_key,
"aws_session_token":aws_session_token},)) as f:
Local agent is running on container as ECS task. The ECS task is attached with permission to access all S3 bucket.
{
"Statement": [
{
"Action": [
"s3:*"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::*"
},
{
"Action": [
"s3:GetObject",
"s3:ListBucket"
],
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::wp-livelots-pt/*",
"arn:aws:s3:::wp-live-lots/*"
]
}
],
"Version": "2012-10-17"
}
Initially flow is running without issue. After one hour, I am getting
Failed to load and execute flow run: ClientError('An error occurred (ExpiredToken) when calling the GetObject operation: The provided token has expired.')
Looks like ECS task is using the credentials when I registered flow. Please helpKevin Kho
06/01/2022, 8:06 PMaws_session_token
is really expired. You might not even need it?Patrick Tan
06/01/2022, 8:12 PMAnna Geller
06/01/2022, 8:16 PMPatrick Tan
06/01/2022, 8:27 PMAnna Geller
06/01/2022, 8:30 PM