Get a list of s3 codes associated with an amazon passkey using powershell?

I tried searching the Internet, how could I get a list of the available s3 codes associated with the Amazon passkey, but either I searched for the wrong terms or didn’t get enough results.

I have an access key and a secret key, but I don’t know the bucket names (s) associated with the IAM account or user.

How can I get a list of bucket names available with Powershell and AWS Tools?

+4
source share
1 answer

, AWS Credentials, , Get-S3Bucket. ListBuckets S3Bucket, :

:

# With credentials stored in the SDK store:
PS C:\> Get-S3Bucket

CreationDate                                                BucketName
------------                                                ----------
5/20/2015 2:00:00 PM                                        MyBucket1
5/21/2015 4:00:00 PM                                        MyBucket2

 # With credentials passed inline:    
PS C:\> Get-S3Bucket -AccessKey "accKey" -SecretKey "secKey" -Region "us-east-1"

CreationDate                                                BucketName
------------                                                ----------
5/20/2015 2:00:00 PM                                        MyBucket1
5/21/2015 4:00:00 PM                                        MyBucket2
+2

Source: https://habr.com/ru/post/1589255/


All Articles