Topic 1 Question 383
A company maintains a REST service using Amazon API Gateway and the API Gateway native API key validation. The company recently launched a new registration page, which allows users to sign up for the service. The registration page creates a new API key using CreateApiKey and sends the new key to the user. When the user attempts to call the API using this key, the user receives a 403 Forbidden error. Existing users are unaffected and can still call the API.
What code updates will grant these new users access to the API?
The createDeployment method must be called so the API can be redeployed to include the newly created API key.
The updateAuthorizer method must be called to update the API's authorizer to include the newly created API key.
The importApiKeys method must be called to import all newly created API keys into the current stage of the API.
The createUsagePlanKey method must be called to associate the newly created API key with the correct usage plan.
ユーザの投票
コメント(3)
- 正解だと思う選択肢: D
D chatgpt
👍 1rdiaz2024/07/11 - 正解だと思う選択肢: D
import boto3
client = boto3.client('apigateway')
Create API Key
response = client.create_api_key( name='NewUserKey', enabled=True )
api_key_id = response['id']
Associate API Key and usage plan
client.create_usage_plan_key( usagePlanId='YOUR_USAGE_PLAN_ID', keyId=api_key_id, keyType='API_KEY' )
👍 1albert_kuo2024/07/27 - 正解だと思う選択肢: D👍 1aws_god2024/11/06
シャッフルモード