The following command will perform the copy operation with the default storage type (STANDARD):
aws s3 cp storage-types.txt s3://object-types-solutions-architect
The s3api command provides detailed information about the objects in the specified bucket as follows:
Try the same command but this time with --storage-class REDUCED_REDUNDANCY:
aws s3 cp storage-types.txt s3://object-types-solutions-architect --storage-class REDUCED_REDUNDANCY
You can validate in the console as well, now the object has been created with RSS.
Try the same but this time with Infrequent Access and OneZone_IA.
aws s3 cp storage-types.txt s3://object-types-solutions-architect --storage-class STANDARD_IA
aws s3 cp storage-types.txt s3://object-types-solutions-architect --storage-class ONEZONE_IA
We have now successfully created new objects specifying standard and one zone storage classes.