Skip to main content

Posts

Showing posts with the label AWS-CLI

Using Aws Cli for S3 Operations

  This article will be about some basic usages of awscli for S3 operations First we need to create a profile, this will be basically storing the information about our S3 connection. $ aws configure AWS Access Key ID []: <this will be Access Key Id> AWS Secret Access Key []: <this will be the Secret Key> Default region name []: <This will be the region name> Default output format []: <This will be the output format of each aws command> Listing the buckets $ aws s3 ls --endpoint-url <endpoint url> 2023-06-07 16:37:25 bucket1 2023-06-14 13:50:00 bucket2 List objects and prefixes in the bucket $ aws s3 ls --endpoint-url <endpoint url> bucket1 PRE folder1 2023-06-15 10:32:40 101713608 object1 Get ObjectLock configuration for a bucket $ aws s3api get-object-lock-configuration --bucket bucket1 { "ObjectLockConfiguration": { "ObjectLockEnabled": "Enabled", "Rule": { "DefaultRetention": { ...