% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/login.R, R/s3.R
\name{dse_has_s3_secret}
\alias{dse_has_s3_secret}
\alias{dse_s3_get_key}
\alias{dse_s3_set_key}
\alias{dse_s3_get_secret}
\alias{dse_s3_set_secret}
\alias{dse_s3}
\title{Setup Amazon Simple Storage Service for the Data Space Ecosystem}
\usage{
dse_has_s3_secret()

dse_s3_get_key(...)

dse_s3_set_key(value, ...)

dse_s3_get_secret(...)

dse_s3_set_secret(value, ...)

dse_s3(
  region = "us-east-1",
  ...,
  s3_key = dse_s3_get_key(),
  s3_secret = dse_s3_get_secret()
)
}
\arguments{
\item{...}{Ignored}

\item{value}{Replacement value for the \code{s3_key} or \code{s3_secret}.}

\item{region}{\href{https://aws.amazon.com/about-aws/global-infrastructure/regions_az/}{AWS Region}
used in instantiating the client}

\item{s3_key, s3_secret}{The s3 key and secret registered under your Data Space
Ecosystem account}
}
\value{
\code{\link[=dse_s3_get_key]{dse_s3_get_key()}} and \code{\link[=dse_s3_get_secret]{dse_s3_get_secret()}} will return the requested s3 details
if set as environment variable (see details).

\code{\link[=dse_has_s3_secret]{dse_has_s3_secret()}} returns a logical value indicating whether s3 details
(key and secret) are set. It will not determine whether the details are valid.
}
\description{
using \href{https://aws.amazon.com/s3/}{Amazon Simple Storage Service (s3)} in the
Data Space Ecosystem requires a key and secret. These functions help you managing
these details and setting up an s3 client.
}
\details{
Working with s3 in the Data Space Ecosystem requires you to create an account,
then register an s3 key as described below. Note that the SentinelHub requires
a different authentication method. See \code{\link[=dse_access_token]{dse_access_token()}} for more details on that.
\subsection{Creating an Account}{

First step is creating an account. You can create one by visiting the
\href{https://identity.dataspace.copernicus.eu/auth/realms/CDSE/account/#/personal-info}{login page}
and click "register". Fill out the form and follow the instructions.
}

\subsection{Registering a s3 Key}{

Now that you have an account, you should visit the
\href{https://eodata-s3keysmanager.dataspace.copernicus.eu/panel/s3-credentials}{s3-credentials page},
and log in with your account details. By clicking "add credential", you can
create a new key and secret. Store them in a safe place, as the secret is only
shown once. You can pass the key and secret as \code{s3_key} and \code{s3_secret} arguments
to functions requesting them. You can also store them as environment variables
such that they persist throughout the R session and don't have to be passed as
arguments (see below).
}

\subsection{S3 Key and Secret as Environment Variables}{

When you share R code, you probably don't want to share your account details.
You can avoid using your \code{s3_key} and \code{s3_secret} in your script by
setting them as environment variable. You can do this yourself manually by
calling \code{dse_s3_set_key()} and \code{dse_s3_set_secret()} at the start of each session.

You can also define them in your \code{.Rprofile} file with
\code{Sys.setenv(CDSE_API_S3ID = "<your key>")} and
\code{Sys.setenv(CDSE_API_S3SECRET = "<your secret>")}. This way,
they are set each time you start a new R session.
}
}
\references{
\url{https://documentation.dataspace.copernicus.eu/APIs/S3.html}
}
\seealso{
Other authentication:
\code{\link[=dse_access_token]{dse_access_token()}},
\code{\link[=dse_get_token_details]{dse_get_token_details()}},
\code{\link[=dse_set_gdal_token]{dse_set_gdal_token()}},
\code{\link[=dse_usage]{dse_usage()}}

Other s3:
\code{\link[=dse_s3_download]{dse_s3_download()}},
\code{\link[=dse_s3_set_gdal_options]{dse_s3_set_gdal_options()}},
\code{\link[=dse_s3_uri_to_vsi]{dse_s3_uri_to_vsi()}}
}
\concept{authentication}
\concept{s3}
