regions.js
function configureRegion(context) {
  // Resolve the AWS region, if it is not already defined on the context
  if (!context.region) {
    context.region = getRegion();
  }
  const msg = `Using region (${process.env.AWS_REGION}) & context.region (${context.region})`;
  context.debug ? context.debug(msg) : console.log(msg);
  return context;
}
function configureRegion(context) {
  // Resolve the AWS region, if it is not already defined on the context
  if (!context.region) {
    context.region = getRegion();
  }
  const msg = `Using region (${process.env.AWS_REGION}) & context.region (${context.region})`;
  context.debug ? context.debug(msg) : console.log(msg);
  return context;
}
function configureRegion ( context ) { // Resolve the AWS region, if it is not already defined on the context if ( ! context . region ) { context . region = getRegion ( ) ; } const msg = ` ${ process . env . AWS_REGION } ${ context . region } ` ; context . debug ? context . debug ( msg ) : console . log ( msg ) ; return context ; }
Keeps context.region as is if it's already configured on the given context, otherwise gets the current region from
process.env.AWS_REGION and sets it on the context as context.region.
@param {Object|RegionAware} context - a context on which to set the region
@returns {RegionAware} the context with its existing region or the current AWS_REGION env variable value.
Keeps context . region as is if it s already configured on the given context otherwise gets the current region from process . env . AWS_REGION and sets it on the context as context . region .