tests/test.sh exit code (0 → resolved); the classification below is post-hoc and cannot change it.{
"command": "echo \"AWS_ENDPOINT_URL=$AWS_ENDPOINT_URL\"; echo \"ENFORCE_IAM=$ENFORCE_IAM\"; aws --version",
"description": "Check environment variables and AWS CLI version"
}AWS_ENDPOINT_URL=http://localstack:4566 ENFORCE_IAM= aws-cli/2.34.48 Python/3.14.4 Linux/6.10.14-linuxkit exe/aarch64.ubuntu.24 [stdout] AWS_ENDPOINT_URL=http://localstack:4566 ENFORCE_IAM= aws-cli/2.34.48 Python/3.14.4 Linux/6.10.14-linuxkit exe/aarch64.ubuntu.24
{
"command": "aws ssm get-parameters-by-path --path /harbor/httpapi/ --recursive --region us-east-1 2>&1 | head -200",
"description": "Read SSM manifest"
}{
"Parameters": [
{
"Name": "/harbor/httpapi/api-id",
"Type": "String",
"Value": "c94d456e",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:07.970000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/api-id",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/user-pool-id",
"Type": "String",
"Value": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:08.818000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/user-pool-id",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/app-client-id",
"Type": "String",
"Value": "670p5f22h9abu549o07ml9me2s",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:09.372000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/app-client-id",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/authorizer-id",
"Type": "String",
"Value": "5e273905",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:10.039000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/authorizer-id",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/integration-id",
"Type": "String",
"Value": "de180b95",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:10.721000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/integration-id",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/function-name",
"Type": "String",
"Value": "harbor-api-handler",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:11.431000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/function-name",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/role-arn",
"Type": "String",
"Value": "arn:aws:iam::000000000000:role/harbor-api-handler-role",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:12.203000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/role-arn",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/resource-server-id",
"Type": "String",
"Value": "harbor-api",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:12.976000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/resource-server-id",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/user-pool-domain",
"Type": "String",
"Value": "harbor-api-domain",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:13.970000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/user-pool-domain",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/log-group-name",
"Type": "String",
"Value": "/aws/apigw/harbor-api",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:14.752000+00:00",
"ARN": "arn:aws:ssm:us-east-1:000000000000:parameter/harbor/httpapi/log-group-name",
"DataType": "text"
},
{
"Name": "/harbor/httpapi/custom-domain-name",
"Type": "String",
"Value": "api.harbor.example",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:37:15.357000+00:00",
"ARN": "arn:aws:ssm:us-ea
…[truncated]{
"command": "aws apigatewayv2 get-api --api-id c94d456e --region us-east-1 2>&1",
"description": "Inspect API"
}{
"ApiEndpoint": "http://c94d456e.execute-api.localhost.localstack.cloud:4566",
"ApiId": "c94d456e",
"ApiKeySelectionExpression": "$request.header.x-api-key",
"CorsConfiguration": {
"AllowCredentials": false,
"AllowHeaders": [
"content-type"
],
"AllowMethods": [
"*"
],
"AllowOrigins": [
"*"
],
"MaxAge": 0
},
"CreatedDate": "2026-05-16T16:36:34.264000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}
[stdout]
{
"ApiEndpoint": "http://c94d456e.execute-api.localhost.localstack.cloud:4566",
"ApiId": "c94d456e",
"ApiKeySelectionExpression": "$request.header.x-api-key",
"CorsConfiguration": {
"AllowCredentials": false,
"AllowHeaders": [
"content-type"
],
"AllowMethods": [
"*"
],
"AllowOrigins": [
"*"
],
"MaxAge": 0
},
"CreatedDate": "2026-05-16T16:36:34.264000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}{
"command": "aws apigatewayv2 get-routes --api-id c94d456e --region us-east-1 2>&1",
"description": "Inspect routes"
}{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "5e4dc7ac",
"RouteKey": "GET /things/{id}",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "28af72fb",
"RouteKey": "POST /things",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a1c8ffbe",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a6a3dae1",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/de180b95"
}
]
}
[stdout]
{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "5e4dc7ac",
"RouteKey": "GET /things/{id}",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "28af72fb",
"RouteKey": "POST /things",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a1c8ffbe",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a6a3dae1",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/de180b95"
}
]
}{
"command": "aws apigatewayv2 get-authorizers --api-id c94d456e --region us-east-1 2>&1",
"description": "Inspect authorizers"
}{
"Items": [
{
"AuthorizerId": "5e273905",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"us-east-1_0888bcd7e9244e699ef19d6f43624eca"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_07840668758749e694add93649fc4e90"
},
"Name": "harbor-jwt-auth"
},
{
"AuthorizerId": "40ef43ba",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"670p5f22h9abu549o07ml9me2s"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_07840668758749e694add93649fc4e90"
},
"Name": "harbor-jwt-orphan"
}
]
}
[stdout]
{
"Items": [
{
"AuthorizerId": "5e273905",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"us-east-1_0888bcd7e9244e699ef19d6f43624eca"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_07840668758749e694add93649fc4e90"
},
"Name": "harbor-jwt-auth"
},
{
"AuthorizerId": "40ef43ba",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"670p5f22h9abu549o07ml9me2s"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_07840668758749e694add93649fc4e90"
},
"Name": "harbor-jwt-orphan"
}
]
}{
"command": "aws apigatewayv2 get-integrations --api-id c94d456e --region us-east-1 2>&1",
"description": "Inspect integrations"
}{
"Items": [
{
"ConnectionType": "INTERNET",
"IntegrationId": "de180b95",
"IntegrationMethod": "POST",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"PayloadFormatVersion": "1.0",
"TimeoutInMillis": 30000
}
]
}
[stdout]
{
"Items": [
{
"ConnectionType": "INTERNET",
"IntegrationId": "de180b95",
"IntegrationMethod": "POST",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"PayloadFormatVersion": "1.0",
"TimeoutInMillis": 30000
}
]
}{
"command": "aws apigatewayv2 get-stages --api-id c94d456e --region us-east-1 2>&1",
"description": "Inspect stages"
}{
"Items": [
{
"AccessLogSettings": {
"DestinationArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api",
"Format": "{\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"status\":\"$context.status\",\"responseLength\":\"$context.responseLength\"}"
},
"AutoDeploy": false,
"CreatedDate": "2026-05-16T16:36:41.838370+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:36:41.838370+00:00",
"RouteSettings": {
"GET /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 2000,
"ThrottlingRateLimit": 1000.0
},
"POST /things": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 200,
"ThrottlingRateLimit": 100.0
},
"DELETE /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 20,
"ThrottlingRateLimit": 10.0
}
},
"StageName": "$default",
"StageVariables": {},
"Tags": {}
}
]
}
[stdout]
{
"Items": [
{
"AccessLogSettings": {
"DestinationArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api",
"Format": "{\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"status\":\"$context.status\",\"responseLength\":\"$context.responseLength\"}"
},
"AutoDeploy": false,
"CreatedDate": "2026-05-16T16:36:41.838370+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:36:41.838370+00:00",
"RouteSettings": {
"GET /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 2000,
"ThrottlingRateLimit": 1000.0
},
"POST /things": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 200,
"ThrottlingRateLimit": 100.0
},
"DELETE /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 20,
"ThrottlingRateLimit": 10.0
}
},
"StageName": "$default",
"StageVariables": {},
"Tags": {}
}
]
}{
"command": "aws cognito-idp describe-user-pool --user-pool-id us-east-1_0888bcd7e9244e699ef19d6f43624eca --region us-east-1 2>&1 | head -100",
"description": "Describe Cognito user pool"
}{
"UserPool": {
"Id": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"Name": "harbor-api-pool",
"Policies": {
"PasswordPolicy": {
"MinimumLength": 8,
"RequireUppercase": true,
"RequireLowercase": true,
"RequireNumbers": true,
"RequireSymbols": true,
"TemporaryPasswordValidityDays": 7
}
},
"DeletionProtection": "INACTIVE",
"LambdaConfig": {},
"LastModifiedDate": "2026-05-16T16:36:20.327165+00:00",
"CreationDate": "2026-05-16T16:36:20.327170+00:00",
"SchemaAttributes": [
{
"Name": "sub",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": false,
"Required": true,
"StringAttributeConstraints": {
"MinLength": "1",
"MaxLength": "2048"
}
},
{
"Name": "name",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "given_name",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "family_name",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "middle_name",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "nickname",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "preferred_username",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "profile",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
[stdout]
{
"UserPool": {
"Id": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"Name": "harbor-api-pool",
"Policies": {
"PasswordPolicy": {
"MinimumLength": 8,
"RequireUppercase": true,
"RequireLowercase": true,
"RequireNumbers": true,
"RequireSymbols": true,
"TemporaryPasswordValidityDays": 7
}
},
"DeletionProtection": "INACTIVE",
"LambdaConfig": {},
"LastModifiedDate": "2026-05-16T1
…[truncated]{
"command": "aws cognito-idp describe-user-pool-client --user-pool-id us-east-1_0888bcd7e9244e699ef19d6f43624eca --client-id 670p5f22h9abu549o07ml9me2s --region us-east-1 2>&1",
"description": "Describe Cognito app client"
}{
"UserPoolClient": {
"UserPoolId": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"ClientName": "harbor-api-client",
"ClientId": "670p5f22h9abu549o07ml9me2s",
"ClientSecret": "794990de",
"LastModifiedDate": "2026-05-16T16:36:24.668110+00:00",
"CreationDate": "2026-05-16T16:36:24.668113+00:00",
"RefreshTokenValidity": 30,
"TokenValidityUnits": {},
"ExplicitAuthFlows": [
"ALLOW_REFRESH_TOKEN_AUTH"
],
"SupportedIdentityProviders": [
"COGNITO"
],
"AllowedOAuthFlowsUserPoolClient": false,
"EnableTokenRevocation": true,
"EnablePropagateAdditionalUserContextData": false,
"AuthSessionValidity": 3
}
}
[stdout]
{
"UserPoolClient": {
"UserPoolId": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"ClientName": "harbor-api-client",
"ClientId": "670p5f22h9abu549o07ml9me2s",
"ClientSecret": "794990de",
"LastModifiedDate": "2026-05-16T16:36:24.668110+00:00",
"CreationDate": "2026-05-16T16:36:24.668113+00:00",
"RefreshTokenValidity": 30,
"TokenValidityUnits": {},
"ExplicitAuthFlows": [
"ALLOW_REFRESH_TOKEN_AUTH"
],
"SupportedIdentityProviders": [
"COGNITO"
],
"AllowedOAuthFlowsUserPoolClient": false,
"EnableTokenRevocation": true,
"EnablePropagateAdditionalUserContextData": false,
"AuthSessionValidity": 3
}
}{
"command": "aws cognito-idp describe-resource-server --user-pool-id us-east-1_0888bcd7e9244e699ef19d6f43624eca --identifier harbor-api --region us-east-1 2>&1",
"description": "Describe Cognito resource server"
}{
"ResourceServer": {
"UserPoolId": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"Identifier": "harbor-api",
"Name": "harbor-api-rs",
"Scopes": [
{
"ScopeName": "read:things",
"ScopeDescription": "Read things"
},
{
"ScopeName": "write:things",
"ScopeDescription": "Write things"
},
{
"ScopeName": "admin:things",
"ScopeDescription": "Admin things"
}
]
}
}
[stdout]
{
"ResourceServer": {
"UserPoolId": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"Identifier": "harbor-api",
"Name": "harbor-api-rs",
"Scopes": [
{
"ScopeName": "read:things",
"ScopeDescription": "Read things"
},
{
"ScopeName": "write:things",
"ScopeDescription": "Write things"
},
{
"ScopeName": "admin:things",
"ScopeDescription": "Admin things"
}
]
}
}{
"command": "aws lambda get-function --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Get Lambda function"
}{
"Configuration": {
"FunctionName": "harbor-api-handler",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"Runtime": "python3.11",
"Role": "arn:aws:iam::000000000000:role/harbor-api-handler-role",
"Handler": "handler.handler",
"CodeSize": 383,
"Description": "",
"Timeout": 3,
"MemorySize": 128,
"LastModified": "2026-05-16T16:36:57.464710+0000",
"CodeSha256": "Bcsb5TbBqHyTgRWncf+fJM4TiBUgwIaYgzHydM2T/ds=",
"Version": "$LATEST",
"DeadLetterConfig": {
"TargetArn": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq"
},
"TracingConfig": {
"Mode": "PassThrough"
},
"RevisionId": "44519160-5549-41f2-8c50-1a251f90d5f2",
"State": "Active",
"LastUpdateStatus": "Successful",
"PackageType": "Zip",
"Architectures": [
"x86_64"
],
"EphemeralStorage": {
"Size": 512
},
"SnapStart": {
"ApplyOn": "None",
"OptimizationStatus": "Off"
},
"RuntimeVersionConfig": {
"RuntimeVersionArn": "arn:aws:lambda:us-east-1::runtime:8eeff65f6809a3ce81507fe733fe09b835899b99481ba22fd75b5a7338290ec1"
},
"LoggingConfig": {
"LogFormat": "Text",
"LogGroup": "/aws/lambda/harbor-api-handler"
}
},
"Code": {
"RepositoryType": "S3",
"Location": "http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876?AWSAccessKeyId=949334387222&Signature=bckYoUtWyCJ6z2b%2BRfLsdm%2F8cWU%3D&Expires=1778953151"
}
}
[stdout]
{
"Configuration": {
"FunctionName": "harbor-api-handler",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"Runtime": "python3.11",
"Role": "arn:aws:iam::000000000000:role/harbor-api-handler-role",
"Handler": "handler.handler",
"CodeSize": 383,
"Description": "",
"Timeout": 3,
"MemorySize": 128,
"LastModified": "2026-05-16T16:36:57.464710+0000",
"CodeSha256": "Bcsb5TbBqHyTgRWncf+fJM4TiBUgwIaYgzHydM2T/ds=",
"Version": "$LATEST",
"DeadLetterConfig": {
"TargetArn": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq"
},
"TracingConfig": {
"Mode": "PassThrough"
},
"RevisionId": "44519160-5549-41f2-8c50-1a251f90d5f2",
"State": "Active",
"LastUpdateStatus": "Successful",
"PackageType": "Zip",
"Architectures": [
"x86_64"
],
"EphemeralStorage": {
"Size": 512
},
"SnapStart": {
"ApplyOn": "None",
"OptimizationStatus": "Off"
},
"RuntimeVersionConfig": {
"RuntimeVersionArn": "arn:aws:lambda:us-east-1::runtime:8eeff65f6809a3ce81507fe733fe09b835899b99481ba22fd75b5a7338290ec1"
},
"LoggingConfig": {
"LogFormat": "Text",
"LogGroup": "/aws/lambda/harbor-api-handler"
}
},
"Code": {
"RepositoryType": "S3",
"Location": "http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876?AWSAccessKeyId=949334387222&Signature=bckYoUtWyCJ6z2b%2BRfLsdm%2F8cWU%3D&Expires=1778953151"
}
}{
"command": "aws lambda get-policy --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Get Lambda policy"
}{
"Policy": "{\"Version\": \"2012-10-17\", \"Id\": \"default\", \"Statement\": [{\"Sid\": \"apigw-all\", \"Effect\": \"Allow\", \"Action\": \"lambda:InvokeFunction\", \"Resource\": \"arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler\", \"Principal\": {\"Service\": \"apigateway.amazonaws.com\"}, \"Condition\": {\"ArnLike\": {\"AWS:SourceArn\": \"arn:aws:execute-api:us-east-1:000000000000:*/*/*\"}}}]}",
"RevisionId": "44519160-5549-41f2-8c50-1a251f90d5f2"
}
[stdout]
{
"Policy": "{\"Version\": \"2012-10-17\", \"Id\": \"default\", \"Statement\": [{\"Sid\": \"apigw-all\", \"Effect\": \"Allow\", \"Action\": \"lambda:InvokeFunction\", \"Resource\": \"arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler\", \"Principal\": {\"Service\": \"apigateway.amazonaws.com\"}, \"Condition\": {\"ArnLike\": {\"AWS:SourceArn\": \"arn:aws:execute-api:us-east-1:000000000000:*/*/*\"}}}]}",
"RevisionId": "44519160-5549-41f2-8c50-1a251f90d5f2"
}{
"command": "aws lambda list-function-url-configs --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "List Lambda URL configs"
}{
"FunctionUrlConfigs": [
{
"FunctionUrl": "http://xxtbdxkbtisr92flmh59vppvsj7vsjoc.lambda-url.us-east-1.localhost.localstack.cloud:4566/",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"CreationTime": "2026-05-16T16:36:46.501526+0000",
"LastModifiedTime": "2026-05-16T16:36:46.501572+0000",
"AuthType": "NONE"
}
]
}
[stdout]
{
"FunctionUrlConfigs": [
{
"FunctionUrl": "http://xxtbdxkbtisr92flmh59vppvsj7vsjoc.lambda-url.us-east-1.localhost.localstack.cloud:4566/",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"CreationTime": "2026-05-16T16:36:46.501526+0000",
"LastModifiedTime": "2026-05-16T16:36:46.501572+0000",
"AuthType": "NONE"
}
]
}{
"command": "aws lambda get-function-event-invoke-config --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Get Lambda async invoke config"
}Exit code 254 aws: [ERROR]: An error occurred (ResourceNotFoundException) when calling the GetFunctionEventInvokeConfig operation: The function arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler:$LATEST doesn't have an EventInvokeConfig Additional error details: Type: User [error] tool reported failure
{
"query": "select:TaskCreate,TaskUpdate,TaskList",
"max_results": 5
}{"type": "tool_reference", "tool_name": "TaskCreate"}
{"type": "tool_reference", "tool_name": "TaskUpdate"}
{"type": "tool_reference", "tool_name": "TaskList"}
{
"command": "aws apigatewayv2 get-domain-name --domain-name api.harbor.example --region us-east-1 2>&1",
"description": "Get custom domain"
}{
"ApiMappingSelectionExpression": "$request.basepath",
"DomainName": "api.harbor.example",
"DomainNameArn": "arn:aws:apigateway:us-east-1::/domainnames/api.harbor.example",
"DomainNameConfigurations": [
{
"ApiGatewayDomainName": "d-6923abfa.execute-api.localhost.localstack.cloud",
"CertificateArn": "arn:aws:acm:us-east-1:000000000000:certificate/34a7a240-9464-4686-a2c3-628796a03dab",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "08c8984b",
"IpAddressType": "ipv4",
"SecurityPolicy": "TLS_1_0"
}
],
"RoutingMode": "API_MAPPING_ONLY",
"Tags": {}
}
[stdout]
{
"ApiMappingSelectionExpression": "$request.basepath",
"DomainName": "api.harbor.example",
"DomainNameArn": "arn:aws:apigateway:us-east-1::/domainnames/api.harbor.example",
"DomainNameConfigurations": [
{
"ApiGatewayDomainName": "d-6923abfa.execute-api.localhost.localstack.cloud",
"CertificateArn": "arn:aws:acm:us-east-1:000000000000:certificate/34a7a240-9464-4686-a2c3-628796a03dab",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "08c8984b",
"IpAddressType": "ipv4",
"SecurityPolicy": "TLS_1_0"
}
],
"RoutingMode": "API_MAPPING_ONLY",
"Tags": {}
}{
"command": "aws logs describe-log-groups --log-group-name-prefix /aws/apigw/harbor-api --region us-east-1 2>&1",
"description": "Describe log group"
}{
"logGroups": [
{
"logGroupName": "/aws/apigw/harbor-api",
"creationTime": 1778949392274,
"metricFilterCount": 0,
"arn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api:*",
"storedBytes": 0,
"logGroupClass": "STANDARD",
"logGroupArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api"
}
]
}
[stdout]
{
"logGroups": [
{
"logGroupName": "/aws/apigw/harbor-api",
"creationTime": 1778949392274,
"metricFilterCount": 0,
"arn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api:*",
"storedBytes": 0,
"logGroupClass": "STANDARD",
"logGroupArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api"
}
]
}{
"command": "aws cloudwatch describe-alarms --alarm-names harbor-api-5xx-alarm --region us-east-1 2>&1",
"description": "Describe alarm"
}{
"MetricAlarms": [
{
"AlarmName": "harbor-api-5xx-alarm",
"AlarmArn": "arn:aws:cloudwatch:us-east-1:000000000000:alarm:harbor-api-5xx-alarm",
"AlarmConfigurationUpdatedTimestamp": "2026-05-16T16:37:02.038742+00:00",
"ActionsEnabled": true,
"OKActions": [],
"AlarmActions": [],
"InsufficientDataActions": [],
"StateValue": "OK",
"StateReason": "Threshold Crossed: no datapoints were received for 1 period and 1 missing datapoint was treated as [NonBreaching].",
"StateReasonData": "{\"version\": \"1.0\", \"queryDate\": \"2026-05-16T16:37:02+0000\", \"period\": 60, \"recentDatapoints\": [], \"threshold\": 0.0, \"statistic\": \"Sum\", \"startDate\": \"2026-05-16T16:37:02+0000\"}",
"StateUpdatedTimestamp": "2026-05-16T16:37:02.451505+00:00",
"MetricName": "5xx",
"Namespace": "AWS/ApiGateway",
"Statistic": "Sum",
"Dimensions": [
{
"Name": "ApiName",
"Value": "harbor-api"
},
{
"Name": "Stage",
"Value": "$default"
}
],
"Period": 60,
"EvaluationPeriods": 1,
"Threshold": 0.0,
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"TreatMissingData": "notBreaching",
"StateTransitionedTimestamp": "2026-05-16T16:37:02.451469+00:00"
}
],
"CompositeAlarms": []
}
[stdout]
{
"MetricAlarms": [
{
"AlarmName": "harbor-api-5xx-alarm",
"AlarmArn": "arn:aws:cloudwatch:us-east-1:000000000000:alarm:harbor-api-5xx-alarm",
"AlarmConfigurationUpdatedTimestamp": "2026-05-16T16:37:02.038742+00:00",
"ActionsEnabled": true,
"OKActions": [],
"AlarmActions": [],
"InsufficientDataActions": [],
"StateValue": "OK",
"StateReason": "Threshold Crossed: no datapoints were received for 1 period and 1 missing datapoint was treated as [NonBreaching].",
"StateReasonData": "{\"version\": \"1.0\", \"queryDate\": \"2026-05-16T16:37:02+0000\", \"period\": 60, \"recentDatapoints\": [], \"threshold\": 0.0, \"statistic\": \"Sum\", \"startDate\": \"2026-05-16T16:37:02+0000\"}",
"StateUpdatedTimestamp": "2026-05-16T16:37:02.451505+00:00",
"MetricName": "5xx",
"Namespace": "AWS/ApiGateway",
"Statistic": "Sum",
"Dimensions": [
{
"Name": "ApiName",
"Value": "harbor-api"
},
{
"Name": "Stage",
"Value": "$default"
}
],
"Period": 60,
"EvaluationPeriods": 1,
"Threshold": 0.0,
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"TreatMissingData": "notBreaching",
"StateTransitionedTimestamp": "2026-05-16T16:37:02.451469+00:00"
}
],
"CompositeAlarms": []
}{
"command": "aws kms get-key-policy --key-id 6a137591-01ed-4eec-a4f1-0c1479ba80f5 --policy-name default --region us-east-1 2>&1",
"description": "Get KMS key policy"
}{
"Policy": "{\n \"Version\":\"2012-10-17\",\n \"Statement\":[\n {\n \"Sid\":\"RootAdmin\",\n \"Effect\":\"Allow\",\n \"Principal\":{\"AWS\":\"arn:aws:iam::000000000000:root\"},\n \"Action\":\"kms:*\",\n \"Resource\":\"*\"\n }\n ]\n}\n"
}
[stdout]
{
"Policy": "{\n \"Version\":\"2012-10-17\",\n \"Statement\":[\n {\n \"Sid\":\"RootAdmin\",\n \"Effect\":\"Allow\",\n \"Principal\":{\"AWS\":\"arn:aws:iam::000000000000:root\"},\n \"Action\":\"kms:*\",\n \"Resource\":\"*\"\n }\n ]\n}\n"
}{
"command": "aws kms get-key-rotation-status --key-id 6a137591-01ed-4eec-a4f1-0c1479ba80f5 --region us-east-1 2>&1",
"description": "Get KMS rotation status"
}{
"KeyRotationEnabled": false,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/6a137591-01ed-4eec-a4f1-0c1479ba80f5"
}
[stdout]
{
"KeyRotationEnabled": false,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/6a137591-01ed-4eec-a4f1-0c1479ba80f5"
}{
"command": "aws iam get-role --role-name harbor-api-handler-role --region us-east-1 2>&1",
"description": "Get IAM role"
}{
"Role": {
"Path": "/",
"RoleName": "harbor-api-handler-role",
"RoleId": "AROAQAAAAAAAI53I4JSGV",
"Arn": "arn:aws:iam::000000000000:role/harbor-api-handler-role",
"CreateDate": "2026-05-16T16:36:25.448567+00:00",
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
},
"MaxSessionDuration": 3600,
"RoleLastUsed": {}
}
}
[stdout]
{
"Role": {
"Path": "/",
"RoleName": "harbor-api-handler-role",
"RoleId": "AROAQAAAAAAAI53I4JSGV",
"Arn": "arn:aws:iam::000000000000:role/harbor-api-handler-role",
"CreateDate": "2026-05-16T16:36:25.448567+00:00",
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
},
"MaxSessionDuration": 3600,
"RoleLastUsed": {}
}
}{
"command": "aws iam list-role-policies --role-name harbor-api-handler-role --region us-east-1 2>&1; aws iam list-attached-role-policies --role-name harbor-api-handler-role --region us-east-1 2>&1",
"description": "List role policies"
}{
"PolicyNames": []
}
{
"AttachedPolicies": [
{
"PolicyName": "AWSLambdaBasicExecutionRole",
"PolicyArn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
]
}
[stdout]
{
"PolicyNames": []
}
{
"AttachedPolicies": [
{
"PolicyName": "AWSLambdaBasicExecutionRole",
"PolicyArn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
]
}{
"command": "aws cognito-idp list-identity-providers --user-pool-id us-east-1_0888bcd7e9244e699ef19d6f43624eca --region us-east-1 2>&1",
"description": "List Cognito identity providers"
}{
"Providers": []
}
[stdout]
{
"Providers": []
}{
"command": "aws sns list-subscriptions-by-topic --topic-arn arn:aws:sns:us-east-1:000000000000:harbor-api-alarms --region us-east-1 2>&1",
"description": "SNS topic subscriptions"
}{
"Subscriptions": []
}
[stdout]
{
"Subscriptions": []
}{
"command": "cd /tmp && rm -f handler.zip && curl -s \"http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876\" -o handler.zip -G --data-urlencode \"AWSAccessKeyId=949334387222\" --data-urlencode \"Signature=bckYoUtWyCJ6z2b+RfLsdm/8cWU=\" --data-urlencode \"Expires=1778953151\" && ls -la handler.zip && unzip -l handler.zip 2>&1",
"description": "Download and inspect lambda zip"
}Exit code 7 [error] tool reported failure
{
"command": "cd /tmp && rm -f handler.zip && URL=$(aws lambda get-function --function-name harbor-api-handler --region us-east-1 --query 'Code.Location' --output text) && curl -s \"$URL\" -o handler.zip && ls -la handler.zip && unzip -o handler.zip -d handler_dir/ 2>&1 && cat handler_dir/*.py",
"description": "Download and view lambda code"
}Exit code 7 [error] tool reported failure
{
"command": "URL=$(aws lambda get-function --function-name harbor-api-handler --region us-east-1 --query 'Code.Location' --output text) && echo \"URL=$URL\" && curl -v -o /tmp/handler.zip \"$URL\" 2>&1 | tail -30",
"description": "Debug curl for code download"
}URL=http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876?AWSAccessKeyId=949334387222&Signature=oCkoTcs34MeeOeOX2fxVEzek6S4%3D&Expires=1778953219
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host localhost.localstack.cloud:4566 was resolved.
* IPv6: (none)
* IPv4: 127.0.0.1
* Trying 127.0.0.1:4566...
* connect to 127.0.0.1 port 4566 from 127.0.0.1 port 49588 failed: Connection refused
* Failed to connect to localhost.localstack.cloud port 4566 after 9 ms: Couldn't connect to server
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection
curl: (7) Failed to connect to localhost.localstack.cloud port 4566 after 9 ms: Couldn't connect to server
[stdout]
URL=http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876?AWSAccessKeyId=949334387222&Signature=oCkoTcs34MeeOeOX2fxVEzek6S4%3D&Expires=1778953219
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host localhost.localstack.cloud:4566 was resolved.
* IPv6: (none)
* IPv4: 127.0.0.1
* Trying 127.0.0.1:4566...
* connect to 127.0.0.1 port 4566 from 127.0.0.1 port 49588 failed: Connection refused
* Failed to connect to localhost.localstack.cloud port 4566 after 9 ms: Couldn't connect to server
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection
curl: (7) Failed to connect to localhost.localstack.cloud port 4566 after 9 ms: Couldn't connect to server{
"command": "URL=$(aws lambda get-function --function-name harbor-api-handler --region us-east-1 --query 'Code.Location' --output text) && URL_FIXED=${URL/localhost.localstack.cloud/localstack} && echo \"$URL_FIXED\" && curl -s -o /tmp/handler.zip \"$URL_FIXED\" && ls -la /tmp/handler.zip && rm -rf /tmp/handler_dir && unzip -o /tmp/handler.zip -d /tmp/handler_dir/ && echo '---' && find /tmp/handler_dir -type f",
"description": "Download lambda zip via localstack hostname"
}http://localstack:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876?AWSAccessKeyId=949334387222&Signature=MNoGuJ%2FaAbtwoe1vFpScaoDap4E%3D&Expires=1778953225 -rw-r--r-- 1 root root 383 May 16 16:40 /tmp/handler.zip Archive: /tmp/handler.zip inflating: /tmp/handler_dir/handler.py --- /tmp/handler_dir/handler.py [stdout] http://localstack:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-d6dd5385-1090-405f-863b-7d1552be0876?AWSAccessKeyId=949334387222&Signature=MNoGuJ%2FaAbtwoe1vFpScaoDap4E%3D&Expires=1778953225 -rw-r--r-- 1 root root 383 May 16 16:40 /tmp/handler.zip Archive: /tmp/handler.zip inflating: /tmp/handler_dir/handler.py --- /tmp/handler_dir/handler.py
{
"file_path": "/tmp/handler_dir/handler.py"
}1 import json
2 def handler(event, context):
3 rk = (event.get("requestContext") or {}).get("http", {}).get("method", "?")
4 path = event.get("rawPath", "?")
5 pp = event.get("pathParameters") or {}
6 return {"statusCode": 200, "headers": {"Content-Type": "application/json"}, "body": json.dumps({"method": rk, "path": path, "params": pp})}
7
{
"command": "aws apigatewayv2 update-authorizer --api-id c94d456e --authorizer-id 5e273905 --jwt-configuration \"Audience=670p5f22h9abu549o07ml9me2s,Issuer=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_0888bcd7e9244e699ef19d6f43624eca\" --region us-east-1 2>&1",
"description": "Fix authorizer issuer and audience"
}{
"AuthorizerId": "5e273905",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"670p5f22h9abu549o07ml9me2s"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_0888bcd7e9244e699ef19d6f43624eca"
},
"Name": "harbor-jwt-auth"
}
[stdout]
{
"AuthorizerId": "5e273905",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"670p5f22h9abu549o07ml9me2s"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_0888bcd7e9244e699ef19d6f43624eca"
},
"Name": "harbor-jwt-auth"
}{
"command": "aws apigatewayv2 delete-authorizer --api-id c94d456e --authorizer-id 40ef43ba --region us-east-1 2>&1",
"description": "Delete orphan authorizer"
}(Bash completed with no output)
{
"command": "aws apigatewayv2 update-route --api-id c94d456e --route-id 5e4dc7ac --authorization-scopes \"harbor-api/read:things\" --region us-east-1 2>&1\naws apigatewayv2 update-route --api-id c94d456e --route-id 28af72fb --authorization-scopes \"harbor-api/write:things\" --region us-east-1 2>&1\naws apigatewayv2 update-route --api-id c94d456e --route-id a1c8ffbe --authorization-scopes \"harbor-api/admin:things\" --region us-east-1 2>&1",
"description": "Update route scopes to include resource server prefix"
}{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "5e4dc7ac",
"RouteKey": "GET /things/{id}",
"Target": "integrations/de180b95"
}
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "28af72fb",
"RouteKey": "POST /things",
"Target": "integrations/de180b95"
}
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a1c8ffbe",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/de180b95"
}
[stdout]
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "5e4dc7ac",
"RouteKey": "GET /things/{id}",
"Target": "integrations/de180b95"
}
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "28af72fb",
"RouteKey": "POST /things",
"Target": "integrations/de180b95"
}
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a1c8ffbe",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/de180b95"
}{
"command": "aws apigatewayv2 update-route --api-id c94d456e --route-id a6a3dae1 --authorization-type NONE --authorizer-id \"\" --region us-east-1 2>&1",
"description": "Set OPTIONS route to NONE auth"
}{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "a6a3dae1",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/de180b95"
}
[stdout]
{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "a6a3dae1",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/de180b95"
}{
"command": "aws apigatewayv2 update-integration --api-id c94d456e --integration-id de180b95 --payload-format-version 2.0 --region us-east-1 2>&1",
"description": "Update integration to payload format 2.0"
}{
"ConnectionType": "INTERNET",
"IntegrationId": "de180b95",
"IntegrationMethod": "POST",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"PayloadFormatVersion": "2.0",
"TimeoutInMillis": 30000
}
[stdout]
{
"ConnectionType": "INTERNET",
"IntegrationId": "de180b95",
"IntegrationMethod": "POST",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"PayloadFormatVersion": "2.0",
"TimeoutInMillis": 30000
}{
"command": "aws apigatewayv2 update-stage --api-id c94d456e --stage-name '$default' --auto-deploy --access-log-settings 'DestinationArn=arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api,Format={\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"routeKey\":\"$context.routeKey\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationStatus\":\"$context.integrationStatus\"}' --region us-east-1 2>&1",
"description": "Enable auto-deploy and fix access log format"
}Exit code 252
aws: [ERROR]: An error occurred (ParamValidation): Error parsing parameter '--access-log-settings': Expected: '=', received: '"' for input:
DestinationArn=arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api,Format={"requestId":"$context.requestId","ip":"$context.identity.sourceIp","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","routeKey":"$context.routeKey","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength","integrationErrorMessage":"$context.integrationErrorMessage","integrationStatus":"$context.integrationStatus"}
^
[error] tool reported failure{
"command": "aws logs put-retention-policy --log-group-name /aws/apigw/harbor-api --retention-in-days 30 --region us-east-1 2>&1",
"description": "Set log group retention"
}(Bash completed with no output)
{
"command": "aws apigatewayv2 update-api --api-id c94d456e --cors-configuration 'AllowCredentials=false,AllowHeaders=content-type,authorization,AllowMethods=GET,POST,DELETE,OPTIONS,AllowOrigins=https://app.harbor.example,MaxAge=600' --region us-east-1 2>&1",
"description": "Tighten CORS configuration"
}{
"ApiEndpoint": "http://c94d456e.execute-api.localhost.localstack.cloud:4566",
"ApiId": "c94d456e",
"ApiKeySelectionExpression": "$request.header.x-api-key",
"CorsConfiguration": {
"AllowCredentials": false,
"AllowHeaders": [
"content-type",
"authorization"
],
"AllowMethods": [
"GET",
"POST",
"DELETE",
"OPTIONS"
],
"AllowOrigins": [
"https://app.harbor.example"
],
"MaxAge": 600
},
"CreatedDate": "2026-05-16T16:36:34.264000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}
[stdout]
{
"ApiEndpoint": "http://c94d456e.execute-api.localhost.localstack.cloud:4566",
"ApiId": "c94d456e",
"ApiKeySelectionExpression": "$request.header.x-api-key",
"CorsConfiguration": {
"AllowCredentials": false,
"AllowHeaders": [
"content-type",
"authorization"
],
"AllowMethods": [
"GET",
"POST",
"DELETE",
"OPTIONS"
],
"AllowOrigins": [
"https://app.harbor.example"
],
"MaxAge": 600
},
"CreatedDate": "2026-05-16T16:36:34.264000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}{
"command": "aws lambda remove-permission --function-name harbor-api-handler --statement-id apigw-all --region us-east-1 2>&1\naws lambda add-permission --function-name harbor-api-handler --statement-id apigw-c94d456e --action lambda:InvokeFunction --principal apigateway.amazonaws.com --source-arn \"arn:aws:execute-api:us-east-1:000000000000:c94d456e/*/*\" --region us-east-1 2>&1",
"description": "Tighten Lambda resource policy SourceArn"
}{
"Statement": "{\"Sid\": \"apigw-c94d456e\", \"Effect\": \"Allow\", \"Action\": \"lambda:InvokeFunction\", \"Resource\": \"arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler\", \"Principal\": {\"Service\": \"apigateway.amazonaws.com\"}, \"Condition\": {\"ArnLike\": {\"AWS:SourceArn\": \"arn:aws:execute-api:us-east-1:000000000000:c94d456e/*/*\"}}}"
}
[stdout]
{
"Statement": "{\"Sid\": \"apigw-c94d456e\", \"Effect\": \"Allow\", \"Action\": \"lambda:InvokeFunction\", \"Resource\": \"arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler\", \"Principal\": {\"Service\": \"apigateway.amazonaws.com\"}, \"Condition\": {\"ArnLike\": {\"AWS:SourceArn\": \"arn:aws:execute-api:us-east-1:000000000000:c94d456e/*/*\"}}}"
}{
"command": "aws lambda delete-function-url-config --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Delete Lambda function URL"
}(Bash completed with no output)
{
"command": "cat > /tmp/dlq-policy.json <<'EOF'\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Action\": [\"sqs:SendMessage\"],\n \"Resource\": \"arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq\"\n }\n ]\n}\nEOF\naws iam put-role-policy --role-name harbor-api-handler-role --policy-name harbor-dlq-write --policy-document file:///tmp/dlq-policy.json --region us-east-1 2>&1",
"description": "Add DLQ SendMessage to role"
}(Bash completed with no output)
{
"command": "cat > /tmp/kms-policy.json <<'EOF'\n{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"RootAdmin\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"AWS\": \"arn:aws:iam::000000000000:root\"},\n \"Action\": \"kms:*\",\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"AllowCloudWatchLogs\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"Service\": \"logs.us-east-1.amazonaws.com\"},\n \"Action\": [\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey*\",\n \"kms:Describe*\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"ArnLike\": {\n \"kms:EncryptionContext:aws:logs:arn\": \"arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api\"\n }\n }\n }\n ]\n}\nEOF\naws kms put-key-policy --key-id 6a137591-01ed-4eec-a4f1-0c1479ba80f5 --policy-name default --policy file:///tmp/kms-policy.json --region us-east-1 2>&1",
"description": "Update KMS key policy with logs principal"
}(Bash completed with no output)
{
"command": "aws kms enable-key-rotation --key-id 6a137591-01ed-4eec-a4f1-0c1479ba80f5 --region us-east-1 2>&1",
"description": "Enable KMS rotation"
}(Bash completed with no output)
{
"command": "aws cloudwatch put-metric-alarm --alarm-name harbor-api-5xx-alarm --metric-name 5xx --namespace AWS/ApiGateway --statistic Sum --period 60 --evaluation-periods 1 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --treat-missing-data notBreaching --dimensions Name=ApiName,Value=harbor-api Name=Stage,Value='$default' --alarm-actions arn:aws:sns:us-east-1:000000000000:harbor-api-alarms --region us-east-1 2>&1",
"description": "Add SNS to alarm actions"
}(Bash completed with no output)
{
"command": "aws apigatewayv2 update-domain-name --domain-name api.harbor.example --domain-name-configurations CertificateArn=arn:aws:acm:us-east-1:000000000000:certificate/34a7a240-9464-4686-a2c3-628796a03dab,EndpointType=REGIONAL,SecurityPolicy=TLS_1_2 --region us-east-1 2>&1",
"description": "Update custom domain TLS to 1.2"
}{
"ApiMappingSelectionExpression": "$request.basepath",
"DomainName": "api.harbor.example",
"DomainNameArn": "arn:aws:apigateway:us-east-1::/domainnames/api.harbor.example",
"DomainNameConfigurations": [
{
"ApiGatewayDomainName": "d-6923abfa.execute-api.localhost.localstack.cloud",
"CertificateArn": "arn:aws:acm:us-east-1:000000000000:certificate/34a7a240-9464-4686-a2c3-628796a03dab",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "08c8984b",
"SecurityPolicy": "TLS_1_2"
}
],
"RoutingMode": "API_MAPPING_ONLY"
}
[stdout]
{
"ApiMappingSelectionExpression": "$request.basepath",
"DomainName": "api.harbor.example",
"DomainNameArn": "arn:aws:apigateway:us-east-1::/domainnames/api.harbor.example",
"DomainNameConfigurations": [
{
"ApiGatewayDomainName": "d-6923abfa.execute-api.localhost.localstack.cloud",
"CertificateArn": "arn:aws:acm:us-east-1:000000000000:certificate/34a7a240-9464-4686-a2c3-628796a03dab",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "08c8984b",
"SecurityPolicy": "TLS_1_2"
}
],
"RoutingMode": "API_MAPPING_ONLY"
}{
"command": "aws cognito-idp update-user-pool-client --user-pool-id us-east-1_0888bcd7e9244e699ef19d6f43624eca --client-id 670p5f22h9abu549o07ml9me2s --allowed-o-auth-flows-user-pool-client --allowed-o-auth-flows client_credentials --allowed-o-auth-scopes \"harbor-api/read:things\" \"harbor-api/write:things\" \"harbor-api/admin:things\" --supported-identity-providers COGNITO --explicit-auth-flows ALLOW_REFRESH_TOKEN_AUTH --region us-east-1 2>&1",
"description": "Enable OAuth client_credentials flow on app client"
}{
"UserPoolClient": {
"UserPoolId": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"ClientName": "harbor-api-client",
"ClientId": "670p5f22h9abu549o07ml9me2s",
"ClientSecret": "794990de",
"LastModifiedDate": "2026-05-16T16:36:24.668110+00:00",
"CreationDate": "2026-05-16T16:36:24.668113+00:00",
"RefreshTokenValidity": 30,
"TokenValidityUnits": {},
"ExplicitAuthFlows": [
"ALLOW_REFRESH_TOKEN_AUTH"
],
"SupportedIdentityProviders": [
"COGNITO"
],
"AllowedOAuthFlows": [
"client_credentials"
],
"AllowedOAuthScopes": [
"harbor-api/read:things",
"harbor-api/write:things",
"harbor-api/admin:things"
],
"AllowedOAuthFlowsUserPoolClient": true,
"EnableTokenRevocation": true,
"EnablePropagateAdditionalUserContextData": false,
"AuthSessionValidity": 3
}
}
[stdout]
{
"UserPoolClient": {
"UserPoolId": "us-east-1_0888bcd7e9244e699ef19d6f43624eca",
"ClientName": "harbor-api-client",
"ClientId": "670p5f22h9abu549o07ml9me2s",
"ClientSecret": "794990de",
"LastModifiedDate": "2026-05-16T16:36:24.668110+00:00",
"CreationDate": "2026-05-16T16:36:24.668113+00:00",
"RefreshTokenValidity": 30,
"TokenValidityUnits": {},
"ExplicitAuthFlows": [
"ALLOW_REFRESH_TOKEN_AUTH"
],
"SupportedIdentityProviders": [
"COGNITO"
],
"AllowedOAuthFlows": [
"client_credentials"
],
"AllowedOAuthScopes": [
"harbor-api/read:things",
"harbor-api/write:things",
"harbor-api/admin:things"
],
"AllowedOAuthFlowsUserPoolClient": true,
"EnableTokenRevocation": true,
"EnablePropagateAdditionalUserContextData": false,
"AuthSessionValidity": 3
}
}{
"command": "cat > /tmp/stage-update.json <<'EOF'\n{\n \"ApiId\": \"c94d456e\",\n \"StageName\": \"$default\",\n \"AutoDeploy\": true,\n \"AccessLogSettings\": {\n \"DestinationArn\": \"arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api\",\n \"Format\": \"{\\\"requestId\\\":\\\"$context.requestId\\\",\\\"ip\\\":\\\"$context.identity.sourceIp\\\",\\\"requestTime\\\":\\\"$context.requestTime\\\",\\\"httpMethod\\\":\\\"$context.httpMethod\\\",\\\"routeKey\\\":\\\"$context.routeKey\\\",\\\"status\\\":\\\"$context.status\\\",\\\"protocol\\\":\\\"$context.protocol\\\",\\\"responseLength\\\":\\\"$context.responseLength\\\",\\\"integrationErrorMessage\\\":\\\"$context.integrationErrorMessage\\\",\\\"integrationStatus\\\":\\\"$context.integrationStatus\\\"}\"\n }\n}\nEOF\naws apigatewayv2 update-stage --cli-input-json file:///tmp/stage-update.json --region us-east-1 2>&1",
"description": "Update stage via JSON file"
}{
"AccessLogSettings": {
"DestinationArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api",
"Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"routeKey\":\"$context.routeKey\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationStatus\":\"$context.integrationStatus\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:36:41.838370+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:36:41.838370+00:00",
"RouteSettings": {
"GET /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 2000,
"ThrottlingRateLimit": 1000.0
},
"POST /things": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 200,
"ThrottlingRateLimit": 100.0
},
"DELETE /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 20,
"ThrottlingRateLimit": 10.0
}
},
"StageName": "$default",
"StageVariables": {},
"Tags": {}
}
[stdout]
{
"AccessLogSettings": {
"DestinationArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api",
"Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"routeKey\":\"$context.routeKey\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationStatus\":\"$context.integrationStatus\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:36:41.838370+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:36:41.838370+00:00",
"RouteSettings": {
"GET /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 2000,
"ThrottlingRateLimit": 1000.0
},
"POST /things": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 200,
"ThrottlingRateLimit": 100.0
},
"DELETE /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 20,
"ThrottlingRateLimit": 10.0
}
},
"StageName": "$default",
"StageVariables": {},
"Tags": {}
}{
"command": "echo \"=== AUTHORIZERS ===\"; aws apigatewayv2 get-authorizers --api-id c94d456e --region us-east-1\necho \"=== ROUTES ===\"; aws apigatewayv2 get-routes --api-id c94d456e --region us-east-1\necho \"=== INTEGRATION ===\"; aws apigatewayv2 get-integration --api-id c94d456e --integration-id de180b95 --region us-east-1\necho \"=== STAGE ===\"; aws apigatewayv2 get-stage --api-id c94d456e --stage-name '$default' --region us-east-1\necho \"=== CORS ===\"; aws apigatewayv2 get-api --api-id c94d456e --region us-east-1 --query 'CorsConfiguration'\necho \"=== LAMBDA POLICY ===\"; aws lambda get-policy --function-name harbor-api-handler --region us-east-1\necho \"=== LAMBDA URL ===\"; aws lambda list-function-url-configs --function-name harbor-api-handler --region us-east-1",
"description": "Verify HTTP API + Lambda surface"
}=== AUTHORIZERS ===
{
"Items": [
{
"AuthorizerId": "5e273905",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"670p5f22h9abu549o07ml9me2s"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_0888bcd7e9244e699ef19d6f43624eca"
},
"Name": "harbor-jwt-auth"
}
]
}
=== ROUTES ===
{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "5e4dc7ac",
"RouteKey": "GET /things/{id}",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "28af72fb",
"RouteKey": "POST /things",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "5e273905",
"RouteId": "a1c8ffbe",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/de180b95"
},
{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "a6a3dae1",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/de180b95"
}
]
}
=== INTEGRATION ===
{
"ConnectionType": "INTERNET",
"IntegrationId": "de180b95",
"IntegrationMethod": "POST",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"PayloadFormatVersion": "2.0",
"TimeoutInMillis": 30000
}
=== STAGE ===
{
"AccessLogSettings": {
"DestinationArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api",
"Format": "{\"requestId\":\"$context.requestId\",\"ip\":\"$context.identity.sourceIp\",\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"routeKey\":\"$context.routeKey\",\"status\":\"$context.status\",\"protocol\":\"$context.protocol\",\"responseLength\":\"$context.responseLength\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationStatus\":\"$context.integrationStatus\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:36:41.838370+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"DeploymentId": "0eba8002",
"LastDeploymentStatusMessage": "Successfully deployed stage with deployment ID '0eba8002'",
"LastUpdatedDate": "2026-05-16T16:43:36.614511+00:00",
"RouteSettings": {
"GET /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 2000,
"ThrottlingRateLimit": 1000.0
},
"POST /things": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 200,
"ThrottlingRateLimit": 100.0
},
"DELETE /things/{id}": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 20,
"ThrottlingRateLimit": 10.0
}
},
"StageName": "$default",
"StageVariables": {},
"Tags": {}
}
=== CORS ===
{
"AllowCredentials": false,
"AllowHeaders": [
"content-type",
"authorization"
],
"AllowMethods": [
"GET",
"POST",
"DELETE",
"OPTIONS
…[truncated]{
"command": "echo \"=== ROLE INLINE POLICY ===\"; aws iam get-role-policy --role-name harbor-api-handler-role --policy-name harbor-dlq-write --region us-east-1\necho \"=== KMS POLICY ===\"; aws kms get-key-policy --key-id 6a137591-01ed-4eec-a4f1-0c1479ba80f5 --policy-name default --region us-east-1\necho \"=== KMS ROTATION ===\"; aws kms get-key-rotation-status --key-id 6a137591-01ed-4eec-a4f1-0c1479ba80f5 --region us-east-1\necho \"=== LOG GROUP ===\"; aws logs describe-log-groups --log-group-name-prefix /aws/apigw/harbor-api --region us-east-1\necho \"=== ALARM ===\"; aws cloudwatch describe-alarms --alarm-names harbor-api-5xx-alarm --region us-east-1 --query 'MetricAlarms[0].{AlarmActions:AlarmActions,Name:AlarmName}'\necho \"=== DOMAIN ===\"; aws apigatewayv2 get-domain-name --domain-name api.harbor.example --region us-east-1 --query 'DomainNameConfigurations[0].SecurityPolicy'\necho \"=== APP CLIENT ===\"; aws cognito-idp describe-user-pool-client --user-pool-id us-east-1_0888bcd7e9244e699ef19d6f43624eca --client-id 670p5f22h9abu549o07ml9me2s --region us-east-1 --query 'UserPoolClient.{Flows:AllowedOAuthFlows,Scopes:AllowedOAuthScopes,Enabled:AllowedOAuthFlowsUserPoolClient,IdPs:SupportedIdentityProviders}'",
"description": "Verify IAM, KMS, logs, alarm, domain, cognito"
}=== ROLE INLINE POLICY ===
{
"RoleName": "harbor-api-handler-role",
"PolicyName": "harbor-dlq-write",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sqs:SendMessage"
],
"Resource": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq"
}
]
}
}
=== KMS POLICY ===
{
"Policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"RootAdmin\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"AWS\": \"arn:aws:iam::000000000000:root\"},\n \"Action\": \"kms:*\",\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"AllowCloudWatchLogs\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"Service\": \"logs.us-east-1.amazonaws.com\"},\n \"Action\": [\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey*\",\n \"kms:Describe*\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"ArnLike\": {\n \"kms:EncryptionContext:aws:logs:arn\": \"arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api\"\n }\n }\n }\n ]\n}\n"
}
=== KMS ROTATION ===
{
"KeyRotationEnabled": true,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/6a137591-01ed-4eec-a4f1-0c1479ba80f5",
"RotationPeriodInDays": 365,
"NextRotationDate": "2027-05-16T16:43:21.873232+00:00"
}
=== LOG GROUP ===
{
"logGroups": [
{
"logGroupName": "/aws/apigw/harbor-api",
"creationTime": 1778949392274,
"retentionInDays": 30,
"metricFilterCount": 0,
"arn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api:*",
"storedBytes": 0,
"logGroupClass": "STANDARD",
"logGroupArn": "arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api"
}
]
}
=== ALARM ===
{
"AlarmActions": [
"arn:aws:sns:us-east-1:000000000000:harbor-api-alarms"
],
"Name": "harbor-api-5xx-alarm"
}
=== DOMAIN ===
"TLS_1_2"
=== APP CLIENT ===
{
"Flows": [
"client_credentials"
],
"Scopes": [
"harbor-api/read:things",
"harbor-api/write:things",
"harbor-api/admin:things"
],
"Enabled": true,
"IdPs": [
"COGNITO"
]
}
[stdout]
=== ROLE INLINE POLICY ===
{
"RoleName": "harbor-api-handler-role",
"PolicyName": "harbor-dlq-write",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"sqs:SendMessage"
],
"Resource": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq"
}
]
}
}
=== KMS POLICY ===
{
"Policy": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"RootAdmin\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"AWS\": \"arn:aws:iam::000000000000:root\"},\n \"Action\": \"kms:*\",\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"AllowCloudWatchLogs\",\n \"Effect\": \"Allow\",\n \"Principal\": {\"Service\": \"logs.us-east-1.amazonaws.com\"},\n \"Action\": [\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey*\",\n \"kms:Describe*\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"ArnLike\": {\n \"kms:EncryptionContext:aws:logs:arn\": \"arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api\"\n }\n }\n }\n ]\n}\n"
}
=== KMS ROTATION ===
{
"KeyRotationEnabled": true,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/6a137591-01ed-4eec-a4f1-0c1479ba80f5",
"RotationPeriodInDays": 365,
"NextRotationDate": "2027-05-16T16:43:21.873232+00:00"
}
=== L
…[truncated]No file changes, the agent left the workspace untouched.
downloading uv 0.9.7 aarch64-unknown-linux-gnu
Downloading pygments (1.2MiB)
Downloading botocore (12.7MiB)
Downloading pygments
Downloading botocore
Installed 13 packages in 91ms
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.4.1, pluggy-1.6.0 -- /root/.cache/uv/archive-v0/0JJ4HrA80-pD6bYFE3WPL/bin/python
cachedir: .pytest_cache
rootdir: /tests
plugins: json-ctrf-0.3.5
collecting ... collected 77 items
../tests/test_outputs.py::test_01_user_pool_exists PASSED [ 1%]
../tests/test_outputs.py::test_02_resource_server_exists_with_three_scopes PASSED [ 2%]
../tests/test_outputs.py::test_03_app_client_exists PASSED [ 3%]
../tests/test_outputs.py::test_04_lambda_function_exists PASSED [ 5%]
../tests/test_outputs.py::test_05_lambda_role_exists PASSED [ 6%]
../tests/test_outputs.py::test_06_log_group_exists PASSED [ 7%]
../tests/test_outputs.py::test_07_http_api_exists PASSED [ 9%]
../tests/test_outputs.py::test_08_authorizer_exists PASSED [ 10%]
../tests/test_outputs.py::test_09_integration_exists PASSED [ 11%]
../tests/test_outputs.py::test_10_four_routes_present_and_options_keyed_proxy PASSED [ 12%]
../tests/test_outputs.py::test_11_all_ssm_pointers_resolve PASSED [ 14%]
../tests/test_outputs.py::test_12_ssm_pool_id_format_matches_cognito PASSED [ 15%]
../tests/test_outputs.py::test_13_ssm_route_ids_match_actual_routes_by_key PASSED [ 16%]
../tests/test_outputs.py::test_14_ssm_acm_cert_arn_is_acm_shaped PASSED [ 18%]
../tests/test_outputs.py::test_15_api_protocol_type_http PASSED [ 19%]
../tests/test_outputs.py::test_16_stage_default_exists PASSED [ 20%]
../tests/test_outputs.py::test_17_stage_auto_deploy_true PASSED [ 22%]
../tests/test_outputs.py::test_18_route_count_at_least_four PASSED [ 23%]
../tests/test_outputs.py::test_19_authorizer_type_is_jwt PASSED [ 24%]
../tests/test_outputs.py::test_20_authorizer_identity_source_is_authorization_header PASSED [ 25%]
../tests/test_outputs.py::test_21_authorizer_issuer_matches_user_pool_well_known_url PASSED [ 27%]
../tests/test_outputs.py::test_22_authorizer_issuer_uses_https PASSED [ 28%]
../tests/test_outputs.py::test_23_authorizer_audience_is_exactly_the_app_client_id PASSED [ 29%]
../tests/test_outputs.py::test_24_authorizer_audience_does_not_leak_user_pool_id PASSED [ 31%]
../tests/test_outputs.py::test_25_app_client_oauth_flow_is_client_credentials PASSED [ 32%]
../tests/test_outputs.py::test_26_app_client_has_oauth_flows_user_pool_client_true PASSED [ 33%]
../tests/test_outputs.py::test_27_app_client_scopes_are_resource_server_prefixed PASSED [ 35%]
../tests/test_outputs.py::test_28_app_client_scopes_cover_all_three_custom_scopes PASSED [ 36%]
../tests/test_outputs.py::test_29_app_client_has_generated_secret PASSED [ 37%]
../tests/test_outputs.py::test_30_app_client_supported_idp_includes_cognito PASSED [ 38%]
../tests/test_outputs.py::test_31_user_pool_domain_pointer_set_to_expected PASSED [ 40%]
../tests/test_outputs.py::test_32_get_route_is_jwt_with_read_scope PASSED [ 41%]
../tests/test_outputs.py::test_33_post_route_is_jwt_with_write_scope PASSED [ 42%]
../tests/test_outputs.py::test_34_delete_route_is_jwt_with_admin_scope PASSED [ 44%]
../tests/test_outputs.py::test_35_business_routes_all_share_the_same_authorizer_id PASSED [ 45%]
../tests/test_outputs.py::test_36_options_route_authorization_none PASSED [ 46%]
../tests/test_outputs.py::test_37_no_business_route_uses_authorization_type_none PASSED [ 48%]
../tests/test_outputs.py::test_38_no_route_uses_custom_or_request_authorizer PASSED [ 49%]
../tests/test_outputs.py::test_39_integration_type_is_aws_proxy PASSED [ 50%]
../tests/test_outputs.py::test_40_no_mock_integration_present PASSED [ 51%]
../tests/test_outputs.py::test_41_integration_payload_format_v2 PASSED [ 53%]
../tests/test_outputs.py::test_42_integration_method_is_post PASSED [ 54%]
../tests/test_outputs.py::test_43_integration_uri_references_harbor_api_handler_lambda PASSED [ 55%]
../tests/test_outputs.py::test_44_all_routes_target_the_same_integration PASSED [ 57%]
../tests/test_outputs.py::test_45_lambda_resource_policy_grants_apigateway_principal PASSED [ 58%]
../tests/test_outputs.py::test_46_lambda_invoke_action_is_invoke_function PASSED [ 59%]
../tests/test_outputs.py::test_47_lambda_resource_policy_source_arn_pinned_to_this_api PASSED [ 61%]
../tests/test_outputs.py::test_48_lambda_resource_policy_does_not_admit_principal_star_unconditionally PASSED [ 62%]
../tests/test_outputs.py::test_49_stage_default_route_settings_floor_set PASSED [ 63%]
../tests/test_outputs.py::test_50_stage_default_detailed_metrics_enabled PASSED [ 64%]
../tests/test_outputs.py::test_51_stage_route_settings_present_for_all_three_business_routes PASSED [ 66%]
../tests/test_outputs.py::test_52_stage_route_settings_throttle_ordering_get_gt_post_gt_delete PASSED [ 67%]
../tests/test_outputs.py::test_53_stage_per_route_rates_present_and_positive PASSED [ 68%]
../tests/test_outputs.py::test_54_stage_access_log_destination_is_real_log_group PASSED [ 70%]
../tests/test_outputs.py::test_55_stage_access_log_format_is_json_with_required_fields PASSED [ 71%]
../tests/test_outputs.py::test_56_api_has_cors_configuration PASSED [ 72%]
../tests/test_outputs.py::test_57_cors_origin_wildcard_not_combined_with_credentials PASSED [ 74%]
../tests/test_outputs.py::test_58_cors_allow_headers_includes_authorization PASSED [ 75%]
../tests/test_outputs.py::test_59_cors_methods_cover_business_verbs PASSED [ 76%]
../tests/test_outputs.py::test_60_log_group_pointer_matches_actual_group_name PASSED [ 77%]
../tests/test_outputs.py::test_61_log_group_retention_finite_and_bounded PASSED [ 79%]
../tests/test_outputs.py::test_62_log_group_arn_referenced_by_stage_destination PASSED [ 80%]
../tests/test_outputs.py::test_63_lambda_role_trust_admits_lambda_service_only PASSED [ 81%]
../tests/test_outputs.py::test_64_lambda_role_has_basic_execution_policy PASSED [ 83%]
../tests/test_outputs.py::test_65_lambda_runtime_is_python3 PASSED [ 84%]
../tests/test_outputs.py::test_66_no_function_url_bypassing_jwt PASSED [ 85%]
../tests/test_outputs.py::test_67_no_extra_jwt_authorizers_with_different_issuers PASSED [ 87%]
../tests/test_outputs.py::test_68_authorizer_id_in_ssm_resolves_to_a_real_authorizer_on_this_api PASSED [ 88%]
../tests/test_outputs.py::test_69_acm_cert_arn_is_resolvable_acm_resource PASSED [ 89%]
../tests/test_outputs.py::test_70_audience_is_a_singleton_or_pinned_list PASSED [ 90%]
../tests/test_outputs.py::test_71_cors_allow_methods_enumerated_not_wildcard PASSED [ 92%]
../tests/test_outputs.py::test_72_cors_max_age_positive_finite PASSED [ 93%]
../tests/test_outputs.py::test_73_custom_domain_security_policy_tls12 PASSED [ 94%]
../tests/test_outputs.py::test_74_kms_c13a PASSED [ 96%]
../tests/test_outputs.py::test_75_dlq_c13b PASSED [ 97%]
../tests/test_outputs.py::test_76_alarm_c13c PASSED [ 98%]
../tests/test_outputs.py::test_77_kms_c13d PASSED [100%]
=============================== warnings summary ===============================
test_outputs.py: 200 warnings
/root/.cache/uv/archive-v0/0JJ4HrA80-pD6bYFE3WPL/lib/python3.12/site-packages/botocore/auth.py:424: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
datetime_now = datetime.datetime.utcnow()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_outputs.py::test_01_user_pool_exists
PASSED ../tests/test_outputs.py::test_02_resource_server_exists_with_three_scopes
PASSED ../tests/test_outputs.py::test_03_app_client_exists
PASSED ../tests/test_outputs.py::test_04_lambda_function_exists
PASSED ../tests/test_outputs.py::test_05_lambda_role_exists
PASSED ../tests/test_outputs.py::test_06_log_group_exists
PASSED ../tests/test_outputs.py::test_07_http_api_exists
PASSED ../tests/test_outputs.py::test_08_authorizer_exists
PASSED ../tests/test_outputs.py::test_09_integration_exists
PASSED ../tests/test_outputs.py::test_10_four_routes_present_and_options_keyed_proxy
PASSED ../tests/test_outputs.py::test_11_all_ssm_pointers_resolve
PASSED ../tests/test_outputs.py::test_12_ssm_pool_id_format_matches_cognito
PASSED ../tests/test_outputs.py::test_13_ssm_route_ids_match_actual_routes_by_key
PASSED ../tests/test_outputs.py::test_14_ssm_acm_cert_arn_is_acm_shaped
PASSED ../tests/test_outputs.py::test_15_api_protocol_type_http
PASSED ../tests/test_outputs.py::test_16_stage_default_exists
PASSED ../tests/test_outputs.py::test_17_stage_auto_deploy_true
PASSED ../tests/test_outputs.py::test_18_route_count_at_least_four
PASSED ../tests/test_outputs.py::test_19_authorizer_type_is_jwt
PASSED ../tests/test_outputs.py::test_20_authorizer_identity_source_is_authorization_header
PASSED ../tests/test_outputs.py::test_21_authorizer_issuer_matches_user_pool_well_known_url
PASSED ../tests/test_outputs.py::test_22_authorizer_issuer_uses_https
PASSED ../tests/test_outputs.py::test_23_authorizer_audience_is_exactly_the_app_client_id
PASSED ../tests/test_outputs.py::test_24_authorizer_audience_does_not_leak_user_pool_id
PASSED ../tests/test_outputs.py::test_25_app_client_oauth_flow_is_client_credentials
PASSED ../tests/test_outputs.py::test_26_app_client_has_oauth_flows_user_pool_client_true
PASSED ../tests/test_outputs.py::test_27_app_client_scopes_are_resource_server_prefixed
PASSED ../tests/test_outputs.py::test_28_app_client_scopes_cover_all_three_custom_scopes
PASSED ../tests/test_outputs.py::test_29_app_client_has_generated_secret
PASSED ../tests/test_outputs.py::test_30_app_client_supported_idp_includes_cognito
PASSED ../tests/test_outputs.py::test_31_user_pool_domain_pointer_set_to_expected
PASSED ../tests/test_outputs.py::test_32_get_route_is_jwt_with_read_scope
PASSED ../tests/test_outputs.py::test_33_post_route_is_jwt_with_write_scope
PASSED ../tests/test_outputs.py::test_34_delete_route_is_jwt_with_admin_scope
PASSED ../tests/test_outputs.py::test_35_business_routes_all_share_the_same_authorizer_id
PASSED ../tests/test_outputs.py::test_36_options_route_authorization_none
PASSED ../tests/test_outputs.py::test_37_no_business_route_uses_authorization_type_none
PASSED ../tests/test_outputs.py::test_38_no_route_uses_custom_or_request_authorizer
PASSED ../tests/test_outputs.py::test_39_integration_type_is_aws_proxy
PASSED ../tests/test_outputs.py::test_40_no_mock_integration_present
PASSED ../tests/test_outputs.py::test_41_integration_payload_format_v2
PASSED ../tests/test_outputs.py::test_42_integration_method_is_post
PASSED ../tests/test_outputs.py::test_43_integration_uri_references_harbor_api_handler_lambda
PASSED ../tests/test_outputs.py::test_44_all_routes_target_the_same_integration
PASSED ../tests/test_outputs.py::test_45_lambda_resource_policy_grants_apigateway_principal
PASSED ../tests/test_outputs.py::test_46_lambda_invoke_action_is_invoke_function
PASSED ../tests/test_outputs.py::test_47_lambda_resource_policy_source_arn_pinned_to_this_api
PASSED ../tests/test_outputs.py::test_48_lambda_resource_policy_does_not_admit_principal_star_unconditionally
PASSED ../tests/test_outputs.py::test_49_stage_default_route_settings_floor_set
PASSED ../tests/test_outputs.py::test_50_stage_default_detailed_metrics_enabled
PASSED ../tests/test_outputs.py::test_51_stage_route_settings_present_for_all_three_business_routes
PASSED ../tests/test_outputs.py::test_52_stage_route_settings_throttle_ordering_get_gt_post_gt_
… (truncated at 12,000 chars, full verifier log is in the trial artifacts)Reproduce this trial: git checkout 2f94510 && PYTHONPATH=src python3 scripts/build_site.py , then open trial/trial_15a23e43c7264b11. Re-running the agent live requires EVAL_PLATFORM_ENABLE_OAUTH_SMOKE=1 and is non-deterministic.
Trial trial_15a23e43c7264b11 · verifier authoritative; classifier explanatory.