为了使用Yii2建立restful API,有没有人有如何在控制器中添加新动作的好例子?谢谢.
我们有2个React Native应用正在使用AWS Cognito进行身份验证。我们在代码中使用库react-native-aws-cognito-js。在这两天之前,这些应用都可以正常运行。应用程序遇到间歇性的“内部服务器错误”。
我如何找到有关此错误的更多信息?有什么工具可以帮助我们查明原因?
更新资料
从CloudTrail,每个API调用都有一个事件“ CreateNetworkInterface”。许多此类API调用均具有错误代码“ Client.NetworkInterfaceLimitExceeded”。这是什么原因和解决方案?
根据此AWS文档(中文),当由于IP / ENI不足而导致错误时,CloudWatch将不会写入日志。这就解释了错误数量的增加,但CloudWatch中没有日志。
Upate 2
我们发现一个预定的Lambda作业可能会耗尽IP地址。我们停止了批处理作业。但是由于“ Client.NetworkInterfaceLimitExceeded”错误,仍然无法有太多用户登录服务器。我意识到有很多“ CreateNetworkInterface”事件和很少的“ DeleteNetworkInterface”事件。如何“清理/重置” VPC中的所有网络接口?
我使用 CDK 部署代码管道。它工作正常,直到我尝试添加代码管道成功/失败事件的通知。它给出了CREATE_FAILED错误消息Resource handler returned message: "Invalid request provided: AWS::CodeStarNotifications::NotificationRule" (RequestToken: bb566fd0-1ac9-5d61-03fe-f9c27b4196fa, HandlerErrorCode: InvalidRequest)。可能是什么原因?谢谢。
import * as codepipeline from "@aws-cdk/aws-codepipeline";
import * as codepipeline_actions from "@aws-cdk/aws-codepipeline-actions";
import * as codestar_noti from "@aws-cdk/aws-codestarnotifications";
import * as sns from "@aws-cdk/aws-sns";
const pipeline = new codepipeline.Pipeline(...);
const topicArn = props.sns_arn_for_developer;
const targetTopic = sns.Topic.fromTopicArn(
this,
"sns-notification-topic",
topicArn
);
new codestar_noti.NotificationRule(this, "Notification", {
detailType: codestar_noti.DetailType.BASIC,
events: [
"codepipeline-pipeline-pipeline-execution-started",
"codepipeline-pipeline-pipeline-execution-failed",
"codepipeline-pipeline-pipeline-execution-succeeded",
"codepipeline-pipeline-pipeline-execution-canceled",
],
source: pipeline,
targets: [targetTopic],
});
Run Code Online (Sandbox Code Playgroud)
这是生成的 cloudformation 模板的片段。 …
使用现有的 Step Functions 定义 JSON 文件,如何直接在 CDK 中使用它来创建 Step Function?