s3 function

Amazon Simple Storage Service

Amazon Simple Storage Service

s3(config = list(), credentials = list(), endpoint = NULL, region = NULL)

Arguments

  • config: Optional configuration of credentials, endpoint, and/or region.

    • credentials :

      • creds :

        • access_key_id : AWS access key ID
        • secret_access_key : AWS secret access key
        • session_token : AWS temporary session token
      • profile : The name of a profile to use. If not given, then the default profile is used.

      • anonymous : Set anonymous credentials.

    • endpoint : The complete URL to use for the constructed client.

    • region : The AWS Region used in instantiating the client.

    • close_connection : Immediately close all HTTP connections.

    • timeout : The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

    • s3_force_path_style : Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

    • sts_regional_endpoint : Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

  • credentials: Optional credentials shorthand for the config parameter

    • creds :

      • access_key_id : AWS access key ID
      • secret_access_key : AWS secret access key
      • session_token : AWS temporary session token
    • profile : The name of a profile to use. If not given, then the default profile is used.

    • anonymous : Set anonymous credentials.

  • endpoint: Optional shorthand for complete URL to use for the constructed client.

  • region: Optional shorthand for AWS Region used in instantiating the client.

Returns

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- s3(
  config = list(
    credentials = list(
 creds = list(
   access_key_id = "string",
   secret_access_key = "string",
   session_token = "string"
 ),
 profile = "string",
 anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
 access_key_id = "string",
 secret_access_key = "string",
 session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

abort_multipart_uploadThis operation aborts a multipart upload
complete_multipart_uploadCompletes a multipart upload by assembling previously uploaded parts
copy_objectCreates a copy of an object that is already stored in Amazon S3
create_bucketThis action creates an Amazon S3 bucket
create_bucket_metadata_table_configurationCreates a metadata table configuration for a general purpose bucket
create_multipart_uploadThis action initiates a multipart upload and returns an upload ID
create_sessionCreates a session that establishes temporary security credentials to support fast authentication and authorization for the Zonal endpoint API operations on directory buckets
delete_bucketDeletes the S3 bucket
delete_bucket_analytics_configurationThis operation is not supported for directory buckets
delete_bucket_corsThis operation is not supported for directory buckets
delete_bucket_encryptionThis implementation of the DELETE action resets the default encryption for the bucket as server-side encryption with Amazon S3 managed keys (SSE-S3)
delete_bucket_intelligent_tiering_configurationThis operation is not supported for directory buckets
delete_bucket_inventory_configurationThis operation is not supported for directory buckets
delete_bucket_lifecycleDeletes the lifecycle configuration from the specified bucket
delete_bucket_metadata_table_configurationDeletes a metadata table configuration from a general purpose bucket
delete_bucket_metrics_configurationThis operation is not supported for directory buckets
delete_bucket_ownership_controlsThis operation is not supported for directory buckets
delete_bucket_policyDeletes the policy of a specified bucket
delete_bucket_replicationThis operation is not supported for directory buckets
delete_bucket_taggingThis operation is not supported for directory buckets
delete_bucket_websiteThis operation is not supported for directory buckets
delete_objectRemoves an object from a bucket
delete_objectsThis operation enables you to delete multiple objects from a bucket using a single HTTP request
delete_object_taggingThis operation is not supported for directory buckets
delete_public_access_blockThis operation is not supported for directory buckets
download_fileDownload a file from S3 and store it at a specified file location
generate_presigned_url@title Generate a presigned url given a client, its method, and arguments
get_bucket_accelerate_configurationThis operation is not supported for directory buckets
get_bucket_aclThis operation is not supported for directory buckets
get_bucket_analytics_configurationThis operation is not supported for directory buckets
get_bucket_corsThis operation is not supported for directory buckets
get_bucket_encryptionReturns the default encryption configuration for an Amazon S3 bucket
get_bucket_intelligent_tiering_configurationThis operation is not supported for directory buckets
get_bucket_inventory_configurationThis operation is not supported for directory buckets
get_bucket_lifecycleFor an updated version of this API, see GetBucketLifecycleConfiguration
get_bucket_lifecycle_configurationReturns the lifecycle configuration information set on the bucket
get_bucket_locationThis operation is not supported for directory buckets
get_bucket_loggingThis operation is not supported for directory buckets
get_bucket_metadata_table_configurationRetrieves the metadata table configuration for a general purpose bucket
get_bucket_metrics_configurationThis operation is not supported for directory buckets
get_bucket_notificationThis operation is not supported for directory buckets
get_bucket_notification_configurationThis operation is not supported for directory buckets
get_bucket_ownership_controlsThis operation is not supported for directory buckets
get_bucket_policyReturns the policy of a specified bucket
get_bucket_policy_statusThis operation is not supported for directory buckets
get_bucket_replicationThis operation is not supported for directory buckets
get_bucket_request_paymentThis operation is not supported for directory buckets
get_bucket_taggingThis operation is not supported for directory buckets
get_bucket_versioningThis operation is not supported for directory buckets
get_bucket_websiteThis operation is not supported for directory buckets
get_objectRetrieves an object from Amazon S3
get_object_aclThis operation is not supported for directory buckets
get_object_attributesRetrieves all the metadata from an object without returning the object itself
get_object_legal_holdThis operation is not supported for directory buckets
get_object_lock_configurationThis operation is not supported for directory buckets
get_object_retentionThis operation is not supported for directory buckets
get_object_taggingThis operation is not supported for directory buckets
get_object_torrentThis operation is not supported for directory buckets
get_public_access_blockThis operation is not supported for directory buckets
head_bucketYou can use this operation to determine if a bucket exists and if you have permission to access it
head_objectThe HEAD operation retrieves metadata from an object without returning the object itself
list_bucket_analytics_configurationsThis operation is not supported for directory buckets
list_bucket_intelligent_tiering_configurationsThis operation is not supported for directory buckets
list_bucket_inventory_configurationsThis operation is not supported for directory buckets
list_bucket_metrics_configurationsThis operation is not supported for directory buckets
list_bucketsThis operation is not supported for directory buckets
list_directory_bucketsReturns a list of all Amazon S3 directory buckets owned by the authenticated sender of the request
list_multipart_uploadsThis operation lists in-progress multipart uploads in a bucket
list_objectsThis operation is not supported for directory buckets
list_objects_v2Returns some or all (up to 1,000) of the objects in a bucket with each request
list_object_versionsThis operation is not supported for directory buckets
list_partsLists the parts that have been uploaded for a specific multipart upload
put_bucket_accelerate_configurationThis operation is not supported for directory buckets
put_bucket_aclThis operation is not supported for directory buckets
put_bucket_analytics_configurationThis operation is not supported for directory buckets
put_bucket_corsThis operation is not supported for directory buckets
put_bucket_encryptionThis operation configures default encryption and Amazon S3 Bucket Keys for an existing bucket
put_bucket_intelligent_tiering_configurationThis operation is not supported for directory buckets
put_bucket_inventory_configurationThis operation is not supported for directory buckets
put_bucket_lifecycleThis operation is not supported for directory buckets
put_bucket_lifecycle_configurationCreates a new lifecycle configuration for the bucket or replaces an existing lifecycle configuration
put_bucket_loggingThis operation is not supported for directory buckets
put_bucket_metrics_configurationThis operation is not supported for directory buckets
put_bucket_notificationThis operation is not supported for directory buckets
put_bucket_notification_configurationThis operation is not supported for directory buckets
put_bucket_ownership_controlsThis operation is not supported for directory buckets
put_bucket_policyApplies an Amazon S3 bucket policy to an Amazon S3 bucket
put_bucket_replicationThis operation is not supported for directory buckets
put_bucket_request_paymentThis operation is not supported for directory buckets
put_bucket_taggingThis operation is not supported for directory buckets
put_bucket_versioningThis operation is not supported for directory buckets
put_bucket_websiteThis operation is not supported for directory buckets
put_objectAdds an object to a bucket
put_object_aclThis operation is not supported for directory buckets
put_object_legal_holdThis operation is not supported for directory buckets
put_object_lock_configurationThis operation is not supported for directory buckets
put_object_retentionThis operation is not supported for directory buckets
put_object_taggingThis operation is not supported for directory buckets
put_public_access_blockThis operation is not supported for directory buckets
restore_objectThis operation is not supported for directory buckets
select_object_contentThis operation is not supported for directory buckets
upload_partUploads a part in a multipart upload
upload_part_copyUploads a part by copying data from an existing object as data source
write_get_object_responseThis operation is not supported for directory buckets

Examples

## Not run: svc <- s3() # The following example aborts a multipart upload. svc$abort_multipart_upload( Bucket = "examplebucket", Key = "bigobject", UploadId = "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LA..." ) ## End(Not run)
  • Maintainer: Dyfan Jones
  • License: Apache License (>= 2.0)
  • Last published: 2025-03-17

Downloads (last 30 days):