

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# FedRAMP 認定サービスとしての Amazon Rekognition の使用
<a name="fedramp"></a>

 AWS FedRAMP コンプライアンスプログラムには、FedRAMP 認定サービスとして Amazon Rekognition が含まれています。連邦政府または法人のお客様は、 サービスを使用して、米国東部および AWS 米国西部リージョンの機密性の高いワークロードを、中程度の影響レベルまでのデータで処理および保存できます。また、 AWS GovCloud (米国) リージョンの認可境界で影響レベルが高程度のデータを使用して、機密ワークロードのサービスを使用できます。FedRAMP コンプライアンスの詳細については、「[AWS FedRAMP コンプライアンス](https://aws.amazon.com/compliance/fedramp/)」を参照してください。

FedRAMP に準拠するには、連邦情報処理規格 (FIPS) エンドポイントを使用できます。これにより、機密情報を扱うときに、FIPS 140-2 検証済み暗号化モジュールにアクセスできます。FIPS エンドポイントの詳細については、「[FIPS 140-2 の概要](https://aws.amazon.com/compliance/fips/)」を参照してください。

 AWS Command Line Interface (AWS CLI) またはいずれかの AWS SDKs を使用して、Amazon Rekognition で使用されるエンドポイントを指定できます。

Amazon Rekognition で使用可能なエンドポイントについては、「[Amazon Rekognition のリージョンとエンドポイント](https://docs.aws.amazon.com/general/latest/gr/rande.html#rekognition_region)」を参照してください。

以下に、[コレクションの一覧表示](list-collection-procedure.md) トピックの *Amazon Rekognition デベロッパーガイド*。これらは、Amazon Rekognition にアクセスするリージョンと FIPS エンドポイントを指定するように変更されます。

------
#### [ Java ]

Java の場合は、Amazon Rekognition クライアントを作成するときに `withEndpointConfiguration` メソッドを使用します。この例では、米国東部 (バージニア北部) リージョンで FIPS エンドポイントを使用するコレクションを示します。

```
//Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//PDX-License-Identifier: MIT-0 (For details, see https://github.com/awsdocs/amazon-rekognition-developer-guide/blob/master/LICENSE-SAMPLECODE.)

package aws.example.rekognition.image;

import java.util.List;

import com.amazonaws.services.rekognition.AmazonRekognition;
import com.amazonaws.services.rekognition.AmazonRekognitionClientBuilder;
import com.amazonaws.services.rekognition.model.ListCollectionsRequest;
import com.amazonaws.services.rekognition.model.ListCollectionsResult;

public class ListCollections {

   public static void main(String[] args) throws Exception {


      AmazonRekognition amazonRekognition = AmazonRekognitionClientBuilder.standard()
         .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("https://rekognition-fips.us-east-1.amazonaws.com","us-east-1"))
         .build();
 

      System.out.println("Listing collections");
      int limit = 10;
      ListCollectionsResult listCollectionsResult = null;
      String paginationToken = null;
      do {
         if (listCollectionsResult != null) {
            paginationToken = listCollectionsResult.getNextToken();
         }
         ListCollectionsRequest listCollectionsRequest = new ListCollectionsRequest()
                 .withMaxResults(limit)
                 .withNextToken(paginationToken);
         listCollectionsResult=amazonRekognition.listCollections(listCollectionsRequest);
         
         List < String > collectionIds = listCollectionsResult.getCollectionIds();
         for (String resultId: collectionIds) {
            System.out.println(resultId);
         }
      } while (listCollectionsResult != null && listCollectionsResult.getNextToken() !=
         null);
     
   } 
}
```

------
#### [ AWS CLI ]

では AWS CLI、 `--endpoint-url`引数を使用して、Amazon Rekognition にアクセスするエンドポイントを指定します。この例では、米国東部 (オハイオ) リージョンで FIPS エンドポイントを使用するコレクションを示します。

```
aws rekognition list-collections --endpoint-url https://rekognition-fips.us-east-2.amazonaws.com --region us-east-2
```

------
#### [ Python ]

Python の場合は、boto3.client 関数で `endpoint_url` 引数を使用します。指定するエンドポイントに設定します。この例では、米国西部 (オレゴン) リージョンで FIPS エンドポイントを使用するコレクションを示します。

```
#Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#PDX-License-Identifier: MIT-0 (For details, see https://github.com/awsdocs/amazon-rekognition-developer-guide/blob/master/LICENSE-SAMPLECODE.)

import boto3

def list_collections():

    max_results=2
    
    client=boto3.client('rekognition', endpoint_url='https://rekognition-fips.us-west-2.amazonaws.com', region_name='us-west-2')

    #Display all the collections
    print('Displaying collections...')
    response=client.list_collections(MaxResults=max_results)
    collection_count=0
    done=False
    
    while done==False:
        collections=response['CollectionIds']

        for collection in collections:
            print (collection)
            collection_count+=1
        if 'NextToken' in response:
            nextToken=response['NextToken']
            response=client.list_collections(NextToken=nextToken,MaxResults=max_results)
            
        else:
            done=True

    return collection_count   

def main():

    collection_count=list_collections()
    print("collections: " + str(collection_count))
if __name__ == "__main__":
    main()
```

------