![]() * chore: Fixing SwiftLint warnings in Amplify project * chore: Fixing SwiftLint warnings in APICategoryPlugin project * chore: Fixing SwiftLint warnings in AnalyticsCategoryPlugin project * chore: Fixing SwiftLint warnings in AWSCognitoAuthPlugin project * chore: Fixing SwiftLint warnings in DataStoreCategoryPlugin project * chore: Fixing SwiftLint warnings in PredictionsCategoryPlugin project * chore: Fixing SwiftLint warnings in StoragePlugin project |
||
---|---|---|
.. | ||
Info.plist | ||
README.md | ||
RESTWithIAMIntegrationTests.swift |
README.md
REST API with IAM Auth Integration Tests
The following steps show how to set up an API endpoint with APIGateway and Lambda source. The auth configured will be IAM. This set up is used to run the tests in RESTWithIAMIntegrationTests.swift
.
Set-up
-
amplify init
-
amplify add api
. Below follows these steps closely: https://aws-amplify.github.io/docs/ios/api#rest-api
? Please select from one of the below mentioned services: `REST`
? Provide a friendly name for your resource to be used as a label for this category in the project: `restAPI`
? Provide a path (e.g., /items) `/items`
? Choose a Lambda source `Create a new Lambda function`
? Provide a friendly name for your resource to be used as a label for this category in the project: `restwithiamintegratie962cff0`
? Provide the AWS Lambda function name: `restwithiamintegratie962cff0`
? Choose the runtime that you want to use: NodeJS
? Choose the function template that you want to use: `Serverless ExpressJS function (Integration with API Gateway)`
? Do you want to configure advanced settings? `Yes`
? Do you want to access other resources created in this project from your Lambda function? `No`
? Do you want to invoke this function on a recurring schedule? `No`
? Do you want to configure Lambda layers for this function? `No`
? Do you want to edit the local lambda function now? `No`
Succesfully added the Lambda function locally
? Restrict API access `Yes`
? Who should have access? `Authenticated and Guest users`
? What kind of access do you want for Authenticated users? `create, read, update, delete`
? What kind of access do you want for Guest users? `create, read, update, delete`
Successfully added auth resource locally.
? Do you want to add another path? `No`
Successfully added resource api1ed65adc locally
-
Create a file
RESTWithIAMIntegrationTests-amplifyconfiguration.json
inside~/.aws-amplify/amplify-ios/testconfiguration/
and copyamplifyconfiguration.json
-
Run the tests