將您的時間用來建立出色的應用程式。
讓 Amazon Cognito 處理身分驗證。

安全且可擴展的身分存放區
Amazon Cognito 使用者集區提供安全的身分存放區,可擴展至數百萬個使用者。Cognito 使用者集區可以更輕鬆地設定,而無需佈建任何基礎設施,使用者集區的所有成員都具一個可以透過軟體開發套件 (SDK) 管理的目錄描述檔。
閱讀更多有關 Cognito 使用者集區的資訊

應用程式和使用者的安全
Amazon Cognito 支援多重驗證以及靜態資料和傳輸中資料的加密。Amazon Cognito 符合 HIPAA 規範,且符合 PCI DSS、SOC、ISO/IEC 27001、ISO/IEC 27017、ISO/IEC 27018 和 ISO 9001 標準。
閱讀其他有關安全與合規的資訊

AWS 資源的存取控制
Amazon Cognito 提供可從應用程式控制 AWS 資源存取的解決方案。您可以定義角色並將使用者對應到不同角色,如此一來,您的應用程式可以只存取授權每位使用者的資源。或者,您可以在 AWS Identity and Access Management 許可政策中使用身分供應商提供的屬性,從而控制滿足特定屬性條件的使用者對資源的存取。
請參閱更多有關控制 AWS 資源存取的資訊

輕鬆與您的應用程式整合
透過內建 UI 以及聯合身分供應商的簡單組態,您可以整合 Amazon Cognito,在最短時間內將使用者登入、註冊和存取控制新增到應用程式。您可以自訂 UI,將公司品牌放在前面和中央,以便與所有使用者互動。
查看如何快速地將 Amazon Cognito 與應用程式整合
就是這麼簡單
-
iOS Objective C
-
Android
-
iOS Swift
-
React Native
-
Web 應用程式
-
iOS Objective C
-
使用軟體開發套件與幾行程式碼登入使用者和取回字符。
// iOS Objective-C // AppDelegate.m - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options { return [[AWSCognitoAuth defaultCognitoAuth] application:app openURL:url options:options]; } // ViewController.m AWSCognitoAuth * cognitoAuth = [AWSCognitoAuth defaultCognitoAuth]; [cognitoAuth getSession:self completion:^(AWSCognitoAuthUserSession * _Nullable session, NSError * _Nullable error) { if(error) { NSLog(@"Error: %@", error.userInfo[@"error"]); } else { //Do something with session NSLog(@"Claims: %@", t.result.idToken.claims); } }];
-
Android
-
使用軟體開發套件與幾行程式碼登入使用者和取回字符。
//Android // 1) -- Create an instance of Auth -- Auth.Builder builder = new Auth.Builder() .setAppClientId(getString(R.string.cognito_client_id)); .setAppCognitoWebDomain(getString(R.string.cognito_web_domain)); .setApplicationContext(getApplicationContext()); .setAuthHandler(new callback()); .setSignInRedirect(getString(R.string.app_redirect_signin)); .setSignOutRedirect(getString(R.string.app_redirect_signout)); .setScopes(userScopes); auth = builder.build(); // 2) – Set up url redirect in your app manifest -- <intent-filter> <data android:host="YOUR_REDIRECT_URI_AUTHORITY"android:scheme="YOUR_REDIRECT_SCHEME"/> </intent-filter> // 3) -- Get tokens for your user -- auth.getSession();
-
iOS Swift
-
使用軟體開發套件與幾行程式碼登入使用者和取回字符。
// iOS Swift // AppDelegate.swift func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { return AWSCognitoAuth.default().application(app, open: url, options: options) } // ViewController.swift let cognitoAuth = AWSCognitoAuth.default() cognitoAuth.getSession(self) { (session:AWSCognitoAuthUserSession?, error:Error?) in if(error != nil) { print((error! as NSError).userInfo["error"] as? String) }else { //Do something with session } }
-
React Native
-
使用軟體開發套件與幾行程式碼登入使用者和取回字符。
// Add 'aws-amplify' and 'aws-amplify-react-native' libraries into your application // Configure Auth category with your Amazon Cognito credentials Amplify.configure({ Auth: { identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX', // Amazon Cognito Identity Pool ID region: 'XX-XXXX-X', // Amazon Cognito Region } }); // The withAuthenticator component adds Sign Up and Sign In capabilities to your app export default withAuthenticator(class App extends React.Component { // ... your main component });
-
Web 應用程式
-
使用軟體開發套件與幾行程式碼登入使用者和取回字符。
// Add 'aws-amplify' library into your application // Configure Auth category with your Amazon Cognito credentials Amplify.configure({ Auth: { identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX', // Amazon Cognito Identity Pool ID region: 'XX-XXXX-X', // Amazon Cognito Region } }); // Call Auth.signIn with user credentials Auth.signIn(username, password) .then(user => console.log(user)) .catch(err => console.log(err));

受開發人員信任



按使用量付費。無最低費用。
如果您使用 Amazon Cognito Identity 建立使用者集區,則只需要按照每月作用中使用者 (MAU) 付費。如果日曆月內有相關的使用者身分操作 (例如註冊、登入、字符重新整理、密碼變更或使用者帳戶屬性更新),則該使用者會視為一個 MAU。您無須為該日曆月中的後續工作階段或非作用中使用者付費。
定價方案 (MAU) | 每個 MAU 的價格 |
第一個 50,000 | 免費 |
下一個 50,000 | 0.00550 USD |
下一個 900,000 | 0.00460 USD |
下一個 9,000,000 | 0.00325 USD |
超過 10,000,000 | 0.00250 USD |
透過 SAML 或 OIDC 聯合身分登入的使用者,超過 50 個 MAU 免費方案的 MAU 價格是 0.015 USD/MAU。 Amazon Cognito 對於使用聯合身分功能取得驗證使用者或訪客使用者的 AWS 登入資料一律不收取費用。請在這裡參閱更多我們的定價。