Created
July 28, 2021 12:22
-
-
Save ms-transalis/672e2a60085ca8e4f76eac4276d08549 to your computer and use it in GitHub Desktop.
Example sam template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: >- | |
| Amazon Vendor Central Integration | |
| Transform: AWS::Serverless-2016-10-31 | |
| Globals: | |
| Function: | |
| CodeUri: ./ | |
| Runtime: nodejs14.x | |
| MemorySize: 128 | |
| Timeout: 60 | |
| Environment: | |
| Variables: | |
| PROD_BUCKET: "***" | |
| PROD_ARCHIEVE_BUCKET: "***" | |
| Parameters: | |
| AppId: | |
| Type: String | |
| Resources: | |
| # *** IAM *** | |
| VendorCentralIntegrationRole: | |
| Type: AWS::IAM::Role | |
| Properties: | |
| AssumeRolePolicyDocument: | |
| Version: 2012-10-17 | |
| Statement: | |
| - Effect: "Allow" | |
| Principal: | |
| Service: | |
| - lambda.amazonaws.com | |
| Action: | |
| - sts:AssumeRole | |
| ManagedPolicyArns: | |
| - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole | |
| # *** Lambda functions *** | |
| uploadFilesFunction: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Handler: src/vendor-central/upload-files.uploadFiles | |
| Description: Lambda function that uploads files to vendor central, contains logic to split calls to multiple endpoints. | |
| Role: !GetAtt VendorCentralIntegrationRole.Arn | |
| getPurchaseOrdersFunction: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| Handler: src/vendor-central/get-purchase-orders.getPurchaseOrders | |
| Description: A Lambda function that gets a vendor central invoice. | |
| Role: !GetAtt VendorCentralIntegrationRole.Arn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment