---
keyword: [Extend, Third Party Technology, AWS]
nav: wcp_docs
parent_url: /wcp_docs/
title: Authenticate to Workday-Provided AWS Account
layout: subsection
---

This topic outlines different ways in which you can access the Workday-provided AWS account using the short-term credentials obtained from the Workday Developer Site.

## <a id="section_1"></a>Access Account from Local Machine

<b>AWS Configuration File</b>

1.  [Obtain Short-Term Credential for AWS Command Line Interface](/wcp_docs/GUID-306fac40-0f62-4016-9720-1e01021cd939-enHYPHENus.html).
2.  Create or open the shared `credentials` file. This file is `~/.aws/credentials` on Linux and macOS systems, and `%USERPROFILE%\.aws\credentials` on Windows systems.
3.  To create the default profile, add the following text to the shared `credentials` file. Replace the sample values with the credentials you copied.

    ```
    [default] 
    aws_access_key_id = AKIAIOSFODNN7EXAMPLE
    aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    aws_session_token = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
    ```

4.  You can create many named profiles to access different AWS environments. To create a named profile (Example: `dev`), append the name of the profile and the copied credentials to the `credentials` file.

    ```
    [default] 
    aws_access_key_id = AKIAIOSFODNN7EXAMPLE
    aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    aws_session_token = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
    [dev] 
    aws_access_key_id = AKIAIOSFODNN7EXAMPLE
    aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
    aws_session_token = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
    ```

5.  To access S3 buckets for the default profile, execute the `aws s3 ls` CLI command. To access S3 buckets for a named profile, append the name of the profile to the command. Example: `aws s3 ls --profile dev`.


<b>Windows Command Line</b>

You can use environment variables instead of the AWS Configuration file to access the Workday-provided AWS account. Export the environment variables as shown below in a Windows command line terminal. Use the short-term credentials obtained from the Workday Developer Site.

```
set AWS_ACCESS_KEY_ID = AKIAIOSFODNN7EXAMPLE
set AWS_SECRET_ACCESS_KEY = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
set AWS_SESSION_TOKEN = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
```

After you export the environment variables, you can run any AWS CLI command. Example: `aws s3 ls`.

<b>Create Lambda Function Using Windows Command Line</b>

You can use a Windows command line terminal to author and deploy an AWS Lambda function. This illustration shows a lambda_function.py file containing the Python code intended for deployment. Once this file is compressed into a zip file, you can use it as input for the `aws lambda create-function` command, as illustrated below.

![](GUID-02fb0493-3d5b-41a0-b7e3-dc48538bbb00.png)

```
aws lambda create-function --function-name <function-name> --runtime python3.12 --zip-file fileb://lambda_function.zip --handler lambda_function.handler –role <role-arn>
```

![](GUID-d33b1e5a-4937-43c5-aef3-24c809109234.png)

You can also use PowerShell or Linux to author and deploy an AWS Lambda function.

<b>Windows PowerShell</b>

You can also set up credentials through environment variables using PowerShell. Use the following environment variables to set the variables in a PowerShell terminal.

```
$Env:ISENGARD_PRODUCTION_ACCOUNT="false"
$Env:AWS_ACCESS_KEY_ID = AKIAIOSFODNN7EXAMPLE
$Env:AWS_SECRET_ACCESS_KEY = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$Env:AWS_SESSION_TOKEN = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
```

After you export the environment variables in PowerShell, you can run any AWS CLI command.

<b>Linux Terminal</b>

Use the following environment variables to set the variables in a PowerShell terminal.

```
export AWS_ACCESS_KEY_ID = AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_SESSION_TOKEN = IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZ2luX2IQoJb3JpZVERYLONGSTRINGEXAMPLE
```

## <a id="section_2"></a>AWS SAM (Serverless Application Model)

AWS SAM CLI (Serverless Application Model Command Line Interface) is a command-line tool for developing serverless applications. The Serverless Application Model (SAM) is an open-source framework for building serverless applications. SAM extends AWS CloudFormation to provide a simplified way of defining AWS Lambda functions, s3 buckets and other AWS resources needed by your serverless application.

The AWS SAM CLI allows developers to locally develop, test, and deploy serverless applications defined using the AWS SAM templates. Some of the key features of the AWS SAM CLI include:

-   Local Development: You can use the SAM CLI to test your serverless applications locally before deploying them to AWS. This helps in faster development cycles and debugging.
-   Local Testing: SAM CLI provides local testing capabilities for Lambda functions, making it easier to iterate and test your code without deploying it to AWS.
-   Code Packaging: SAM CLI helps package your serverless application code and dependencies into a deployment package that can be deployed to AWS.
-   Deployment: You can use the SAM CLI to deploy your serverless applications to AWS. It leverages AWS CloudFormation under the hood to create and manage the necessary AWS resources.
-   Built-in Commands: SAM CLI provides several commands for common tasks, such as creating a new serverless application, building artifacts, invoking functions locally, and deploying applications.


To install the AWS SAM CLI, please refer to the instructions on [Installing the AWS SAM CLI](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html).

