Getting following error for put-bucket-lifecycle-configuration :
[root@ADM-PROD-OMNI noc-scripts]# aws s3api put-bucket-lifecycle-configuration --bucket noc-try --lifecycle-configuration lifecycle.json
usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument operation: Invalid choice, valid choices are:
abort-multipart-upload | complete-multipart-upload
copy-object | create-bucket
create-multipart-upload | delete-bucket
delete-bucket-cors | delete-bucket-lifecycle
delete-bucket-policy | delete-bucket-replication
delete-bucket-tagging | delete-bucket-website
delete-object | delete-objects
get-bucket-acl | get-bucket-cors
get-bucket-lifecycle | get-bucket-location
get-bucket-logging | get-bucket-notification
get-bucket-notification-configuration | get-bucket-policy
get-bucket-replication | get-bucket-request-payment
get-bucket-tagging | get-bucket-versioning
get-bucket-website | get-object
get-object-acl | get-object-torrent
head-bucket | head-object
list-buckets | list-multipart-uploads
list-object-versions | list-objects
list-parts | put-bucket-acl
put-bucket-cors | put-bucket-lifecycle
put-bucket-logging | put-bucket-notification
put-bucket-notification-configuration | put-bucket-policy
put-bucket-replication | put-bucket-request-payment
put-bucket-tagging | put-bucket-versioning
put-bucket-website | put-object
put-object-acl | restore-object
upload-part | upload-part-copy
wait | help
But
get-bucket-lifecycle is working this means my aws is configured :
[root@ADM-PROD-OMNI noc-scripts]# aws s3api get-bucket-lifecycle --bucket 4sm-wrapup
RULES clear multipart failed files Enabled
**OR**
[root@ADM-PROD-OMNI noc-scripts]# aws s3api get-bucket-lifecycle --bucket noc-try
A client error (NoSuchLifecycleConfiguration) occurred when calling the GetBucketLifecycle operation: The lifecycle configuration does not exist
Also tried :
[root@ADM-PROD-OMNI noc-scripts]# aws s3api put-bucket-lifecycle --bucket noc-try --lifecycle-configuration lifecycle.json
Error parsing parameter '--lifecycle-configuration': Expected: '=', received: '.' for input:
lifecycle.json
^
Please let me know what is wrong here ?