diff --git a/DevOps/AWS/SAM/AWS_SAM.md b/DevOps/AWS/SAM/AWS_SAM.md index 3749405..1bc258d 100644 --- a/DevOps/AWS/SAM/AWS_SAM.md +++ b/DevOps/AWS/SAM/AWS_SAM.md @@ -48,6 +48,25 @@ This information can be found in the Security Credentials section of the given [ ![](/_img/access-key-aws.png) +### Switching between credentials + +You should set up a different IAM user for each project. + +You can do this with: + +```sh +aws configure --profile +``` + +This will then ask you to add the credentials for the user. + +You can switch between different credentials for the user as follows: + +```sh +AWS_PROFILE= sam build + +``` + ## Starting a SAM project First create a directory for your project which will serve as the repository: @@ -137,6 +156,12 @@ ClockFunction: Method: get ``` +We can test the syntax with: + +```sh +sam validate +``` + Just like with `HelloWorld`, we will create a directory for this function: `clock` and we will initialise it as an `npm` project. ```sh