Relative Content

Tag Archive for amazon-web-servicescommand-line-interface

figure out programatically when my aws session expires

I am using a wrapper that gets me an aws session using some sort of sso login. I can see that session in ~/aws/credentials – I need my tooling (preferably either python boto3 or shell script using aws client) to understand when that session will finish. The session information in the credentials file doesnt have any expiry values.

cp command aws CLI

I want to upload this document into my bucket in S3 but when put in the command the error message of
The user-provided path Document1000 does not exist.
pops up
aws s3 cp test.txt s3://mybucket/test2.txt
what do you put as the key of the bucket

Which IAM policy corresponds to AWS CLI organization commands?

I’m trying to use the AWS CLI, specifically the command “aws organizations describe-account” and am unsure which IAM policy to attach to my IAM role. Currently my role only has the AmazonEC2FullAccess policy. AWSOrganizationsReadOnlyAccess was my first guess, but that doesn’t provide the required access. Neither does AWSOrganizationsFullAccess.