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"
}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": "61e4be54",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:33:57.999000+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_f9868f8f502c4bd2ada5f86b7bf1b2df",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:33:58.762000+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": "yqevu5hwyfjv2h9kfvl1llqv1v",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:33:59.249000+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": "2a1ac7d6",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:33:59.719000+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": "1a96a878",
"Version": 1,
"LastModifiedDate": "2026-05-16T16:34:00.189000+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:34:00.666000+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:34:01.316000+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:34:01.853000+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:34:02.336000+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:34:02.755000+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:34:03.162000+00:00",
"ARN": "arn:aws:ssm:us-ea
…[truncated]{
"command": "aws apigatewayv2 get-api --api-id 61e4be54 --region us-east-1 2>&1",
"description": "Inspect API"
}{
"ApiEndpoint": "http://61e4be54.execute-api.localhost.localstack.cloud:4566",
"ApiId": "61e4be54",
"ApiKeySelectionExpression": "$request.header.x-api-key",
"CorsConfiguration": {
"AllowCredentials": false,
"AllowHeaders": [
"content-type"
],
"AllowMethods": [
"*"
],
"AllowOrigins": [
"*"
],
"MaxAge": 0
},
"CreatedDate": "2026-05-16T16:33:42.374000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}
[stdout]
{
"ApiEndpoint": "http://61e4be54.execute-api.localhost.localstack.cloud:4566",
"ApiId": "61e4be54",
"ApiKeySelectionExpression": "$request.header.x-api-key",
"CorsConfiguration": {
"AllowCredentials": false,
"AllowHeaders": [
"content-type"
],
"AllowMethods": [
"*"
],
"AllowOrigins": [
"*"
],
"MaxAge": 0
},
"CreatedDate": "2026-05-16T16:33:42.374000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}{
"command": "aws apigatewayv2 get-authorizers --api-id 61e4be54 --region us-east-1 2>&1",
"description": "Inspect authorizers"
}{
"Items": [
{
"AuthorizerId": "2a1ac7d6",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ecbcb64ad3db44ecaf54dc3991d32691"
},
"Name": "harbor-jwt-auth"
},
{
"AuthorizerId": "fa97ba41",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"yqevu5hwyfjv2h9kfvl1llqv1v"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ecbcb64ad3db44ecaf54dc3991d32691"
},
"Name": "harbor-jwt-orphan"
}
]
}
[stdout]
{
"Items": [
{
"AuthorizerId": "2a1ac7d6",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ecbcb64ad3db44ecaf54dc3991d32691"
},
"Name": "harbor-jwt-auth"
},
{
"AuthorizerId": "fa97ba41",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"yqevu5hwyfjv2h9kfvl1llqv1v"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ecbcb64ad3db44ecaf54dc3991d32691"
},
"Name": "harbor-jwt-orphan"
}
]
}{
"command": "aws apigatewayv2 get-integrations --api-id 61e4be54 --region us-east-1 2>&1",
"description": "Inspect integrations"
}{
"Items": [
{
"ConnectionType": "INTERNET",
"IntegrationId": "1a96a878",
"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": "1a96a878",
"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-routes --api-id 61e4be54 --region us-east-1 2>&1",
"description": "Inspect routes"
}{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "adf79acd",
"RouteKey": "GET /things/{id}",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "4013221a",
"RouteKey": "POST /things",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "a0c55a31",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "219176e8",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/1a96a878"
}
]
}
[stdout]
{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "adf79acd",
"RouteKey": "GET /things/{id}",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "4013221a",
"RouteKey": "POST /things",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "a0c55a31",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "219176e8",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/1a96a878"
}
]
}{
"command": "aws apigatewayv2 get-stages --api-id 61e4be54 --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:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:33:46.187167+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:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:33:46.187167+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 apigatewayv2 get-domain-name --domain-name api.harbor.example --region us-east-1 2>&1",
"description": "Inspect 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/a529ef06-28ca-43c9-8ff1-33ab13b427e0",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "244b4706",
"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/a529ef06-28ca-43c9-8ff1-33ab13b427e0",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "244b4706",
"IpAddressType": "ipv4",
"SecurityPolicy": "TLS_1_0"
}
],
"RoutingMode": "API_MAPPING_ONLY",
"Tags": {}
}{
"command": "aws cognito-idp describe-user-pool --user-pool-id us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df --region us-east-1 2>&1 | head -200",
"description": "Inspect user pool"
}{
"UserPool": {
"Id": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"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:33:28.089128+00:00",
"CreationDate": "2026-05-16T16:33:28.089135+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,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
}
},
{
"Name": "picture",
"AttributeDataType": "String",
"DeveloperOnlyAttribute": false,
"Mutable": true,
"Required": false,
"StringAttributeConstraints": {
"MinLength": "0",
"MaxLength": "2048"
…[truncated]{
"command": "aws cognito-idp describe-user-pool-client --user-pool-id us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df --client-id yqevu5hwyfjv2h9kfvl1llqv1v --region us-east-1 2>&1",
"description": "Inspect app client"
}{
"UserPoolClient": {
"UserPoolId": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+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_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+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_f9868f8f502c4bd2ada5f86b7bf1b2df --identifier harbor-api --region us-east-1 2>&1",
"description": "Inspect resource server"
}{
"ResourceServer": {
"UserPoolId": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"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_f9868f8f502c4bd2ada5f86b7bf1b2df",
"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": "Inspect Lambda"
}{
"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:33:54.421415+0000",
"CodeSha256": "2fig0sNlsN1v8oDzbDq0rBpLLj8Uy2yoPObBPe3dHVs=",
"Version": "$LATEST",
"DeadLetterConfig": {
"TargetArn": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq"
},
"TracingConfig": {
"Mode": "PassThrough"
},
"RevisionId": "51c2c2b0-ebe6-4a85-8a3d-fc2694ff4665",
"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-9aab8664-71f2-4b18-9019-edfe7cb7c468?AWSAccessKeyId=949334387222&Signature=l7dBhd%2Bah3wdtTOHIvPEjawZlfI%3D&Expires=1778952947"
}
}
[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:33:54.421415+0000",
"CodeSha256": "2fig0sNlsN1v8oDzbDq0rBpLLj8Uy2yoPObBPe3dHVs=",
"Version": "$LATEST",
"DeadLetterConfig": {
"TargetArn": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq"
},
"TracingConfig": {
"Mode": "PassThrough"
},
"RevisionId": "51c2c2b0-ebe6-4a85-8a3d-fc2694ff4665",
"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-9aab8664-71f2-4b18-9019-edfe7cb7c468?AWSAccessKeyId=949334387222&Signature=l7dBhd%2Bah3wdtTOHIvPEjawZlfI%3D&Expires=1778952947"
}
}{
"query": "select:TaskCreate,TaskUpdate,TaskList",
"max_results": 3
}{"type": "tool_reference", "tool_name": "TaskCreate"}
{"type": "tool_reference", "tool_name": "TaskUpdate"}
{"type": "tool_reference", "tool_name": "TaskList"}
{
"subject": "Fix JWT authorizer issuer",
"description": "Issuer points at wrong pool; audience set to pool id instead of client id"
}Task #1 created successfully: Fix JWT authorizer issuer
{
"subject": "Fix Lambda role DLQ permission",
"description": "Role missing sqs:SendMessage to DLQ"
}Task #2 created successfully: Fix Lambda role DLQ permission
{
"subject": "Fix KMS key policy + rotation",
"description": "Logs service principal missing; enable annual rotation"
}Task #3 created successfully: Fix KMS key policy + rotation
{
"subject": "Wire alarm to SNS",
"description": "5xx alarm has no AlarmActions"
}Task #4 created successfully: Wire alarm to SNS
{
"subject": "Delete orphan authorizer",
"description": "harbor-jwt-orphan should not exist"
}Task #5 created successfully: Delete orphan authorizer
{
"subject": "Fix route scope strings",
"description": "Routes use bare scope names instead of harbor-api/scope format"
}Task #6 created successfully: Fix route scope strings
{
"subject": "Fix app client OAuth flows + IdPs",
"description": "Missing actual oauth flow; remove unauthorized IdP"
}Task #7 created successfully: Fix app client OAuth flows + IdPs
{
"subject": "Inspect remaining resources",
"description": "Lambda code/policy/url, log group, KMS, DLQ, alarm, role"
}Task #8 created successfully: Inspect remaining resources
{
"subject": "Enable stage auto-deploy",
"description": "Stage AutoDeploy is false"
}Task #9 created successfully: Enable stage auto-deploy
{
"subject": "Fix Lambda resource policy + URL",
"description": "SourceArn wildcard, alternative URL invocation surface"
}Task #10 created successfully: Fix Lambda resource policy + URL
{
"subject": "Fix integration payload format",
"description": "Integration set to 1.0 but handler expects 2.0"
}Task #11 created successfully: Fix integration payload format
{
"subject": "Remove OPTIONS auth + fix CORS",
"description": "OPTIONS /{proxy+} should be NONE; CORS allow-methods wildcard, MaxAge=0"
}Task #12 created successfully: Remove OPTIONS auth + fix CORS
{
"subject": "Fix access log group + format",
"description": "No retention, missing DataDog fields"
}Task #13 created successfully: Fix access log group + format
{
"subject": "Fix custom domain TLS floor",
"description": "SecurityPolicy is TLS_1_0; raise to TLS_1_2"
}Task #14 created successfully: Fix custom domain TLS floor
{
"command": "aws lambda get-policy --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Get Lambda resource 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": "51c2c2b0-ebe6-4a85-8a3d-fc2694ff4665"
}
[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": "51c2c2b0-ebe6-4a85-8a3d-fc2694ff4665"
}{
"command": "aws lambda list-function-url-configs --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Lambda URL configs"
}{
"FunctionUrlConfigs": [
{
"FunctionUrl": "http://uw6bujpe2rzejyzhloixxh2mc31fmgax.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:33:48.275735+0000",
"LastModifiedTime": "2026-05-16T16:33:48.275778+0000",
"AuthType": "NONE"
}
]
}
[stdout]
{
"FunctionUrlConfigs": [
{
"FunctionUrl": "http://uw6bujpe2rzejyzhloixxh2mc31fmgax.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:33:48.275735+0000",
"LastModifiedTime": "2026-05-16T16:33:48.275778+0000",
"AuthType": "NONE"
}
]
}{
"command": "aws lambda get-function-url-config --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Lambda URL config"
}{
"FunctionUrl": "http://uw6bujpe2rzejyzhloixxh2mc31fmgax.lambda-url.us-east-1.localhost.localstack.cloud:4566/",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"AuthType": "NONE",
"CreationTime": "2026-05-16T16:33:48.275735+0000",
"LastModifiedTime": "2026-05-16T16:33:48.275778+0000"
}
[stdout]
{
"FunctionUrl": "http://uw6bujpe2rzejyzhloixxh2mc31fmgax.lambda-url.us-east-1.localhost.localstack.cloud:4566/",
"FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"AuthType": "NONE",
"CreationTime": "2026-05-16T16:33:48.275735+0000",
"LastModifiedTime": "2026-05-16T16:33:48.275778+0000"
}{
"command": "aws iam list-attached-role-policies --role-name harbor-api-handler-role --region us-east-1 2>&1; echo \"---\"; aws iam list-role-policies --role-name harbor-api-handler-role --region us-east-1 2>&1",
"description": "List role policies"
}{
"AttachedPolicies": [
{
"PolicyName": "AWSLambdaBasicExecutionRole",
"PolicyArn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
]
}
---
{
"PolicyNames": []
}
[stdout]
{
"AttachedPolicies": [
{
"PolicyName": "AWSLambdaBasicExecutionRole",
"PolicyArn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
]
}
---
{
"PolicyNames": []
}{
"command": "aws logs describe-log-groups --log-group-name-prefix /aws/apigw/harbor-api --region us-east-1 2>&1",
"description": "Log group config"
}{
"logGroups": [
{
"logGroupName": "/aws/apigw/harbor-api",
"creationTime": 1778949219585,
"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": 1778949219585,
"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 kms describe-key --key-id 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --region us-east-1 2>&1",
"description": "KMS key"
}{
"KeyMetadata": {
"AWSAccountId": "000000000000",
"KeyId": "236ca3aa-d3ba-47f3-87db-91ebe4042a47",
"Arn": "arn:aws:kms:us-east-1:000000000000:key/236ca3aa-d3ba-47f3-87db-91ebe4042a47",
"CreationDate": "2026-05-16T16:33:49.269713+00:00",
"Enabled": true,
"Description": "",
"KeyUsage": "ENCRYPT_DECRYPT",
"KeyState": "Enabled",
"Origin": "AWS_KMS",
"KeyManager": "CUSTOMER",
"CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
"KeySpec": "SYMMETRIC_DEFAULT",
"EncryptionAlgorithms": [
"SYMMETRIC_DEFAULT"
],
"MultiRegion": false,
"CurrentKeyMaterialId": "c3132f7cb8a05a45a8712f23b9262cdfc3132f7cb8a05a45a8712f23b9262cdf"
}
}
[stdout]
{
"KeyMetadata": {
"AWSAccountId": "000000000000",
"KeyId": "236ca3aa-d3ba-47f3-87db-91ebe4042a47",
"Arn": "arn:aws:kms:us-east-1:000000000000:key/236ca3aa-d3ba-47f3-87db-91ebe4042a47",
"CreationDate": "2026-05-16T16:33:49.269713+00:00",
"Enabled": true,
"Description": "",
"KeyUsage": "ENCRYPT_DECRYPT",
"KeyState": "Enabled",
"Origin": "AWS_KMS",
"KeyManager": "CUSTOMER",
"CustomerMasterKeySpec": "SYMMETRIC_DEFAULT",
"KeySpec": "SYMMETRIC_DEFAULT",
"EncryptionAlgorithms": [
"SYMMETRIC_DEFAULT"
],
"MultiRegion": false,
"CurrentKeyMaterialId": "c3132f7cb8a05a45a8712f23b9262cdfc3132f7cb8a05a45a8712f23b9262cdf"
}
}{
"command": "aws kms get-key-policy --key-id 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --policy-name default --region us-east-1 2>&1",
"description": "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 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --region us-east-1 2>&1",
"description": "KMS key rotation"
}{
"KeyRotationEnabled": false,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/236ca3aa-d3ba-47f3-87db-91ebe4042a47"
}
[stdout]
{
"KeyRotationEnabled": false,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/236ca3aa-d3ba-47f3-87db-91ebe4042a47"
}{
"command": "aws cloudwatch describe-alarms --alarm-names harbor-api-5xx-alarm --region us-east-1 2>&1",
"description": "5xx alarm"
}{
"MetricAlarms": [
{
"AlarmName": "harbor-api-5xx-alarm",
"AlarmArn": "arn:aws:cloudwatch:us-east-1:000000000000:alarm:harbor-api-5xx-alarm",
"AlarmConfigurationUpdatedTimestamp": "2026-05-16T16:33:56.018962+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:33:56+0000\", \"period\": 60, \"recentDatapoints\": [], \"threshold\": 0.0, \"statistic\": \"Sum\", \"startDate\": \"2026-05-16T16:33:56+0000\"}",
"StateUpdatedTimestamp": "2026-05-16T16:33:56.117546+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:33:56.117539+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:33:56.018962+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:33:56+0000\", \"period\": 60, \"recentDatapoints\": [], \"threshold\": 0.0, \"statistic\": \"Sum\", \"startDate\": \"2026-05-16T16:33:56+0000\"}",
"StateUpdatedTimestamp": "2026-05-16T16:33:56.117546+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:33:56.117539+00:00"
}
],
"CompositeAlarms": []
}{
"command": "aws sqs get-queue-attributes --queue-url $(aws sqs get-queue-url --queue-name harbor-api-dlq --region us-east-1 --query QueueUrl --output text) --attribute-names All --region us-east-1 2>&1",
"description": "SQS DLQ attributes"
}{
"Attributes": {
"CreatedTimestamp": "1778949233",
"DelaySeconds": "0",
"LastModifiedTimestamp": "1778949233",
"MaximumMessageSize": "1048576",
"MessageRetentionPeriod": "345600",
"QueueArn": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq",
"ReceiveMessageWaitTimeSeconds": "0",
"VisibilityTimeout": "30",
"SqsManagedSseEnabled": "true",
"ApproximateNumberOfMessages": "0",
"ApproximateNumberOfMessagesDelayed": "0",
"ApproximateNumberOfMessagesNotVisible": "0"
}
}
[stdout]
{
"Attributes": {
"CreatedTimestamp": "1778949233",
"DelaySeconds": "0",
"LastModifiedTimestamp": "1778949233",
"MaximumMessageSize": "1048576",
"MessageRetentionPeriod": "345600",
"QueueArn": "arn:aws:sqs:us-east-1:000000000000:harbor-api-dlq",
"ReceiveMessageWaitTimeSeconds": "0",
"VisibilityTimeout": "30",
"SqsManagedSseEnabled": "true",
"ApproximateNumberOfMessages": "0",
"ApproximateNumberOfMessagesDelayed": "0",
"ApproximateNumberOfMessagesNotVisible": "0"
}
}{
"command": "aws lambda get-function --function-name harbor-api-handler --region us-east-1 --query 'Code.Location' --output text | xargs -I {} curl -s {} -o /tmp/lambda.zip && ls -la /tmp/lambda.zip && unzip -l /tmp/lambda.zip",
"description": "Download lambda code"
}Exit code 123 [error] tool reported failure
{
"command": "aws sns get-topic-attributes --topic-arn arn:aws:sns:us-east-1:000000000000:harbor-api-alarms --region us-east-1 2>&1",
"description": "SNS topic attrs"
}{
"Attributes": {
"DisplayName": "",
"Owner": "000000000000",
"Policy": "{\"Version\": \"2008-10-17\", \"Id\": \"__default_policy_ID\", \"Statement\": [{\"Effect\": \"Allow\", \"Sid\": \"__default_statement_ID\", \"Principal\": {\"AWS\": \"*\"}, \"Action\": [\"SNS:GetTopicAttributes\", \"SNS:SetTopicAttributes\", \"SNS:AddPermission\", \"SNS:RemovePermission\", \"SNS:DeleteTopic\", \"SNS:Subscribe\", \"SNS:ListSubscriptionsByTopic\", \"SNS:Publish\"], \"Resource\": \"arn:aws:sns:us-east-1:000000000000:harbor-api-alarms\", \"Condition\": {\"StringEquals\": {\"AWS:SourceOwner\": \"000000000000\"}}}]}",
"SubscriptionsConfirmed": "0",
"SubscriptionsDeleted": "0",
"SubscriptionsPending": "0",
"TopicArn": "arn:aws:sns:us-east-1:000000000000:harbor-api-alarms",
"EffectiveDeliveryPolicy": "{\"http\": {\"defaultHealthyRetryPolicy\": {\"minDelayTarget\": 20, \"maxDelayTarget\": 20, \"numRetries\": 3, \"numMaxDelayRetries\": 0, \"numNoDelayRetries\": 0, \"numMinDelayRetries\": 0, \"backoffFunction\": \"linear\"}, \"disableSubscriptionOverrides\": false, \"defaultRequestPolicy\": {\"headerContentType\": \"text/plain; charset=UTF-8\"}}}"
}
}
[stdout]
{
"Attributes": {
"DisplayName": "",
"Owner": "000000000000",
"Policy": "{\"Version\": \"2008-10-17\", \"Id\": \"__default_policy_ID\", \"Statement\": [{\"Effect\": \"Allow\", \"Sid\": \"__default_statement_ID\", \"Principal\": {\"AWS\": \"*\"}, \"Action\": [\"SNS:GetTopicAttributes\", \"SNS:SetTopicAttributes\", \"SNS:AddPermission\", \"SNS:RemovePermission\", \"SNS:DeleteTopic\", \"SNS:Subscribe\", \"SNS:ListSubscriptionsByTopic\", \"SNS:Publish\"], \"Resource\": \"arn:aws:sns:us-east-1:000000000000:harbor-api-alarms\", \"Condition\": {\"StringEquals\": {\"AWS:SourceOwner\": \"000000000000\"}}}]}",
"SubscriptionsConfirmed": "0",
"SubscriptionsDeleted": "0",
"SubscriptionsPending": "0",
"TopicArn": "arn:aws:sns:us-east-1:000000000000:harbor-api-alarms",
"EffectiveDeliveryPolicy": "{\"http\": {\"defaultHealthyRetryPolicy\": {\"minDelayTarget\": 20, \"maxDelayTarget\": 20, \"numRetries\": 3, \"numMaxDelayRetries\": 0, \"numNoDelayRetries\": 0, \"numMinDelayRetries\": 0, \"backoffFunction\": \"linear\"}, \"disableSubscriptionOverrides\": false, \"defaultRequestPolicy\": {\"headerContentType\": \"text/plain; charset=UTF-8\"}}}"
}
}{
"command": "aws cognito-idp list-user-pools --max-results 20 --region us-east-1 2>&1",
"description": "List Cognito pools"
}{
"UserPools": [
{
"Id": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"Name": "harbor-api-pool",
"LambdaConfig": {},
"LastModifiedDate": "2026-05-16T16:33:28.089128+00:00",
"CreationDate": "2026-05-16T16:33:28.089135+00:00"
},
{
"Id": "us-east-1_ecbcb64ad3db44ecaf54dc3991d32691",
"Name": "harbor-api-pool-decoy",
"LambdaConfig": {},
"LastModifiedDate": "2026-05-16T16:33:28.808935+00:00",
"CreationDate": "2026-05-16T16:33:28.808949+00:00"
}
]
}
[stdout]
{
"UserPools": [
{
"Id": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"Name": "harbor-api-pool",
"LambdaConfig": {},
"LastModifiedDate": "2026-05-16T16:33:28.089128+00:00",
"CreationDate": "2026-05-16T16:33:28.089135+00:00"
},
{
"Id": "us-east-1_ecbcb64ad3db44ecaf54dc3991d32691",
"Name": "harbor-api-pool-decoy",
"LambdaConfig": {},
"LastModifiedDate": "2026-05-16T16:33:28.808935+00:00",
"CreationDate": "2026-05-16T16:33:28.808949+00:00"
}
]
}{
"command": "URL=$(aws lambda get-function --function-name harbor-api-handler --region us-east-1 --query 'Code.Location' --output text); echo \"URL: $URL\"; curl -sv \"$URL\" -o /tmp/lambda.zip 2>&1 | tail -20; ls -la /tmp/lambda.zip; unzip -p /tmp/lambda.zip handler.py 2>&1 | head -80",
"description": "Download and inspect lambda code"
}URL: http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-9aab8664-71f2-4b18-9019-edfe7cb7c468?AWSAccessKeyId=949334387222&Signature=BHXlyHa48u0D86WpvGth4g4a%2Fqk%3D&Expires=1778953028 * 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 39966 failed: Connection refused * Failed to connect to localhost.localstack.cloud port 4566 after 12 ms: Couldn't connect to server * Closing connection ls: cannot access '/tmp/lambda.zip': No such file or directory [stdout] URL: http://localhost.localstack.cloud:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-9aab8664-71f2-4b18-9019-edfe7cb7c468?AWSAccessKeyId=949334387222&Signature=BHXlyHa48u0D86WpvGth4g4a%2Fqk%3D&Expires=1778953028 * 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 39966 failed: Connection refused * Failed to connect to localhost.localstack.cloud port 4566 after 12 ms: Couldn't connect to server * Closing connection ls: cannot access '/tmp/lambda.zip': No such file or directory
{
"command": "URL=$(aws lambda get-function --function-name harbor-api-handler --region us-east-1 --query 'Code.Location' --output text); NEW=$(echo \"$URL\" | sed 's|localhost.localstack.cloud|localstack|'); echo \"$NEW\"; curl -s \"$NEW\" -o /tmp/lambda.zip; ls -la /tmp/lambda.zip; unzip -o /tmp/lambda.zip -d /tmp/lambda/ 2>&1 | head -10",
"description": "Download via internal hostname"
}http://localstack:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-9aab8664-71f2-4b18-9019-edfe7cb7c468?AWSAccessKeyId=949334387222&Signature=8UR8Ng8NnBW0DJ31eBttRfK62jo%3D&Expires=1778953035 -rw-r--r-- 1 root root 383 May 16 16:37 /tmp/lambda.zip Archive: /tmp/lambda.zip inflating: /tmp/lambda/handler.py [stdout] http://localstack:4566/awslambda-us-east-1-tasks/snapshots/000000000000/harbor-api-handler-9aab8664-71f2-4b18-9019-edfe7cb7c468?AWSAccessKeyId=949334387222&Signature=8UR8Ng8NnBW0DJ31eBttRfK62jo%3D&Expires=1778953035 -rw-r--r-- 1 root root 383 May 16 16:37 /tmp/lambda.zip Archive: /tmp/lambda.zip inflating: /tmp/lambda/handler.py
{
"file_path": "/tmp/lambda/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 cognito-idp list-identity-providers --user-pool-id us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df --region us-east-1 2>&1",
"description": "List user pool identity providers"
}{
"Providers": []
}
[stdout]
{
"Providers": []
}{
"command": "aws apigatewayv2 get-api-mappings --domain-name api.harbor.example --region us-east-1 2>&1",
"description": "Domain api mappings"
}{
"Items": [
{
"ApiId": "61e4be54",
"ApiMappingId": "02c12f52",
"ApiMappingKey": "",
"Stage": "$default"
}
]
}
[stdout]
{
"Items": [
{
"ApiId": "61e4be54",
"ApiMappingId": "02c12f52",
"ApiMappingKey": "",
"Stage": "$default"
}
]
}{
"taskId": "8",
"status": "completed"
}Updated task #8 status
{
"taskId": "1",
"status": "in_progress"
}Updated task #1 status
{
"command": "aws apigatewayv2 update-authorizer --api-id 61e4be54 --authorizer-id 2a1ac7d6 --jwt-configuration \"Audience=yqevu5hwyfjv2h9kfvl1llqv1v,Issuer=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df\" --region us-east-1 2>&1",
"description": "Fix JWT authorizer issuer/audience"
}{
"AuthorizerId": "2a1ac7d6",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"yqevu5hwyfjv2h9kfvl1llqv1v"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df"
},
"Name": "harbor-jwt-auth"
}
[stdout]
{
"AuthorizerId": "2a1ac7d6",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"yqevu5hwyfjv2h9kfvl1llqv1v"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df"
},
"Name": "harbor-jwt-auth"
}{
"command": "aws apigatewayv2 delete-authorizer --api-id 61e4be54 --authorizer-id fa97ba41 --region us-east-1 2>&1",
"description": "Delete orphan authorizer"
}(Bash completed with no output)
{
"command": "aws apigatewayv2 update-route --api-id 61e4be54 --route-id adf79acd --authorization-scopes \"harbor-api/read:things\" --region us-east-1 2>&1",
"description": "Fix GET route scope"
}{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "adf79acd",
"RouteKey": "GET /things/{id}",
"Target": "integrations/1a96a878"
}
[stdout]
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "adf79acd",
"RouteKey": "GET /things/{id}",
"Target": "integrations/1a96a878"
}{
"command": "aws apigatewayv2 update-route --api-id 61e4be54 --route-id 4013221a --authorization-scopes \"harbor-api/write:things\" --region us-east-1 2>&1",
"description": "Fix POST route scope"
}{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "4013221a",
"RouteKey": "POST /things",
"Target": "integrations/1a96a878"
}
[stdout]
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "4013221a",
"RouteKey": "POST /things",
"Target": "integrations/1a96a878"
}{
"command": "aws apigatewayv2 update-route --api-id 61e4be54 --route-id a0c55a31 --authorization-scopes \"harbor-api/admin:things\" --region us-east-1 2>&1",
"description": "Fix DELETE route scope"
}{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "a0c55a31",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/1a96a878"
}
[stdout]
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "a0c55a31",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/1a96a878"
}{
"command": "aws apigatewayv2 update-route --api-id 61e4be54 --route-id 219176e8 --authorization-type NONE --region us-east-1 2>&1",
"description": "Make OPTIONS route public"
}{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "219176e8",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/1a96a878"
}
[stdout]
{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "219176e8",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/1a96a878"
}{
"taskId": "1",
"status": "completed"
}Updated task #1 status
{
"taskId": "6",
"status": "completed"
}Updated task #6 status
{
"taskId": "5",
"status": "completed"
}Updated task #5 status
{
"command": "aws apigatewayv2 update-integration --api-id 61e4be54 --integration-id 1a96a878 --payload-format-version 2.0 --region us-east-1 2>&1",
"description": "Fix integration payload format to 2.0"
}{
"ConnectionType": "INTERNET",
"IntegrationId": "1a96a878",
"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": "1a96a878",
"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-api --api-id 61e4be54 --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 config"
}{
"ApiEndpoint": "http://61e4be54.execute-api.localhost.localstack.cloud:4566",
"ApiId": "61e4be54",
"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:33:42.374000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}
[stdout]
{
"ApiEndpoint": "http://61e4be54.execute-api.localhost.localstack.cloud:4566",
"ApiId": "61e4be54",
"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:33:42.374000+00:00",
"DisableExecuteApiEndpoint": false,
"IpAddressType": "ipv4",
"Name": "harbor-api",
"ProtocolType": "HTTP",
"RouteSelectionExpression": "$request.method $request.path",
"Tags": {}
}{
"command": "aws apigatewayv2 update-stage --api-id 61e4be54 --stage-name '$default' --auto-deploy --region us-east-1 2>&1",
"description": "Enable stage auto-deploy"
}{
"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": true,
"CreatedDate": "2026-05-16T16:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:33:46.187167+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": "{\"requestTime\":\"$context.requestTime\",\"httpMethod\":\"$context.httpMethod\",\"status\":\"$context.status\",\"responseLength\":\"$context.responseLength\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"LastUpdatedDate": "2026-05-16T16:33:46.187167+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 apigatewayv2 update-domain-name --domain-name api.harbor.example --domain-name-configurations \"CertificateArn=arn:aws:acm:us-east-1:000000000000:certificate/a529ef06-28ca-43c9-8ff1-33ab13b427e0,EndpointType=REGIONAL,SecurityPolicy=TLS_1_2\" --region us-east-1 2>&1",
"description": "Raise custom domain TLS floor"
}{
"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/a529ef06-28ca-43c9-8ff1-33ab13b427e0",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "244b4706",
"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/a529ef06-28ca-43c9-8ff1-33ab13b427e0",
"DomainNameStatus": "AVAILABLE",
"EndpointType": "REGIONAL",
"HostedZoneId": "244b4706",
"SecurityPolicy": "TLS_1_2"
}
],
"RoutingMode": "API_MAPPING_ONLY"
}{
"taskId": "12",
"status": "in_progress"
}Updated task #12 status
{
"taskId": "11",
"status": "completed"
}Updated task #11 status
{
"taskId": "9",
"status": "completed"
}Updated task #9 status
{
"taskId": "14",
"status": "completed"
}Updated task #14 status
{
"command": "aws logs put-retention-policy --log-group-name /aws/apigw/harbor-api --retention-in-days 90 --region us-east-1 2>&1 && aws logs describe-log-groups --log-group-name-prefix /aws/apigw/harbor-api --region us-east-1 --query 'logGroups[0].retentionInDays' 2>&1",
"description": "Set log retention"
}90 [stdout] 90
{
"command": "FMT='{\"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\",\"integrationStatus\":\"$context.integrationStatus\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationLatency\":\"$context.integrationLatency\",\"responseLatency\":\"$context.responseLatency\"}'\naws apigatewayv2 update-stage --api-id 61e4be54 --stage-name '$default' --access-log-settings \"DestinationArn=arn:aws:logs:us-east-1:000000000000:log-group:/aws/apigw/harbor-api,Format=$FMT\" --region us-east-1 2>&1",
"description": "Update access log format with DataDog fields"
}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","integrationStatus":"$context.integrationStatus","integrationErrorMessage":"$context.integrationErrorMessage","integrationLatency":"$context.integrationLatency","responseLatency":"$context.responseLatency"}
^
[error] tool reported failure{
"command": "cat > /tmp/access-log.json <<'EOF'\n{\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\\\",\\\"integrationStatus\\\":\\\"$context.integrationStatus\\\",\\\"integrationErrorMessage\\\":\\\"$context.integrationErrorMessage\\\",\\\"integrationLatency\\\":\\\"$context.integrationLatency\\\",\\\"responseLatency\\\":\\\"$context.responseLatency\\\"}\"\n}\nEOF\naws apigatewayv2 update-stage --api-id 61e4be54 --stage-name '$default' --access-log-settings file:///tmp/access-log.json --region us-east-1 2>&1",
"description": "Update access log format via 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\",\"integrationStatus\":\"$context.integrationStatus\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationLatency\":\"$context.integrationLatency\",\"responseLatency\":\"$context.responseLatency\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"DeploymentId": "61a79893",
"LastDeploymentStatusMessage": "Successfully deployed stage with deployment ID '61a79893'",
"LastUpdatedDate": "2026-05-16T16:39:28.983867+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\",\"integrationStatus\":\"$context.integrationStatus\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationLatency\":\"$context.integrationLatency\",\"responseLatency\":\"$context.responseLatency\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"DeploymentId": "61a79893",
"LastDeploymentStatusMessage": "Successfully deployed stage with deployment ID '61a79893'",
"LastUpdatedDate": "2026-05-16T16:39:28.983867+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": {}
}{
"taskId": "13",
"status": "completed"
}Updated task #13 status
{
"taskId": "12",
"status": "completed"
}Updated task #12 status
{
"taskId": "10",
"status": "in_progress"
}Updated task #10 status
{
"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-invoke --action lambda:InvokeFunction --principal apigateway.amazonaws.com --source-arn \"arn:aws:execute-api:us-east-1:000000000000:61e4be54/*/*\" --region us-east-1 2>&1\naws lambda get-policy --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Replace lambda resource policy with scoped source-arn"
}{
"Statement": "{\"Sid\": \"apigw-invoke\", \"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:61e4be54/*/*\"}}}"
}
{
"Policy": "{\"Version\": \"2012-10-17\", \"Id\": \"default\", \"Statement\": [{\"Sid\": \"apigw-invoke\", \"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:61e4be54/*/*\"}}}]}",
"RevisionId": "c9da67d9-6d17-4a42-8fc2-92667082681b"
}
[stdout]
{
"Statement": "{\"Sid\": \"apigw-invoke\", \"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:61e4be54/*/*\"}}}"
}
{
"Policy": "{\"Version\": \"2012-10-17\", \"Id\": \"default\", \"Statement\": [{\"Sid\": \"apigw-invoke\", \"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:61e4be54/*/*\"}}}]}",
"RevisionId": "c9da67d9-6d17-4a42-8fc2-92667082681b"
}{
"command": "aws lambda delete-function-url-config --function-name harbor-api-handler --region us-east-1 2>&1\naws lambda list-function-url-configs --function-name harbor-api-handler --region us-east-1 2>&1",
"description": "Delete the alternative function URL invocation surface"
}{
"FunctionUrlConfigs": []
}
[stdout]
{
"FunctionUrlConfigs": []
}{
"taskId": "2",
"status": "in_progress"
}Updated task #2 status
{
"taskId": "10",
"status": "completed"
}Updated task #10 status
{
"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-api-dlq-send --policy-document file:///tmp/dlq-policy.json --region us-east-1 2>&1\naws iam list-role-policies --role-name harbor-api-handler-role --region us-east-1 2>&1",
"description": "Add SQS SendMessage permission to lambda role"
}{
"PolicyNames": [
"harbor-api-dlq-send"
]
}
[stdout]
{
"PolicyNames": [
"harbor-api-dlq-send"
]
}{
"taskId": "2",
"status": "completed"
}Updated task #2 status
{
"taskId": "3",
"status": "in_progress"
}Updated task #3 status
{
"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:DescribeKey\"\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 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --policy-name default --policy file:///tmp/kms-policy.json --region us-east-1 2>&1\naws kms enable-key-rotation --key-id 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --region us-east-1 2>&1\naws kms get-key-rotation-status --key-id 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --region us-east-1 2>&1",
"description": "Update KMS policy to allow CloudWatch Logs + enable rotation"
}{
"KeyRotationEnabled": true,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/236ca3aa-d3ba-47f3-87db-91ebe4042a47",
"RotationPeriodInDays": 365,
"NextRotationDate": "2027-05-16T16:40:20.019584+00:00"
}
[stdout]
{
"KeyRotationEnabled": true,
"KeyId": "arn:aws:kms:us-east-1:000000000000:key/236ca3aa-d3ba-47f3-87db-91ebe4042a47",
"RotationPeriodInDays": 365,
"NextRotationDate": "2027-05-16T16:40:20.019584+00:00"
}{
"taskId": "4",
"status": "in_progress"
}Updated task #4 status
{
"taskId": "3",
"status": "completed"
}Updated task #3 status
{
"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 0 --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\naws cloudwatch describe-alarms --alarm-names harbor-api-5xx-alarm --region us-east-1 --query 'MetricAlarms[0].AlarmActions' 2>&1",
"description": "Wire alarm to SNS"
}[
"arn:aws:sns:us-east-1:000000000000:harbor-api-alarms"
]
[stdout]
[
"arn:aws:sns:us-east-1:000000000000:harbor-api-alarms"
]{
"taskId": "4",
"status": "completed"
}Updated task #4 status
{
"taskId": "7",
"status": "in_progress"
}Updated task #7 status
{
"command": "aws cognito-idp describe-user-pool-client --user-pool-id us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df --client-id yqevu5hwyfjv2h9kfvl1llqv1v --region us-east-1 --output json 2>&1",
"description": "Re-check current client config"
}{
"UserPoolClient": {
"UserPoolId": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+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_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+00:00",
"RefreshTokenValidity": 30,
"TokenValidityUnits": {},
"ExplicitAuthFlows": [
"ALLOW_REFRESH_TOKEN_AUTH"
],
"SupportedIdentityProviders": [
"COGNITO"
],
"AllowedOAuthFlowsUserPoolClient": false,
"EnableTokenRevocation": true,
"EnablePropagateAdditionalUserContextData": false,
"AuthSessionValidity": 3
}
}{
"command": "aws cognito-idp update-user-pool-client \\\n --user-pool-id us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df \\\n --client-id yqevu5hwyfjv2h9kfvl1llqv1v \\\n --supported-identity-providers COGNITO \\\n --allowed-o-auth-flows-user-pool-client \\\n --allowed-o-auth-flows client_credentials \\\n --allowed-o-auth-scopes \"harbor-api/read:things\" \"harbor-api/write:things\" \"harbor-api/admin:things\" \\\n --explicit-auth-flows ALLOW_REFRESH_TOKEN_AUTH \\\n --region us-east-1 2>&1",
"description": "Update client OAuth flow + scopes + IdPs"
}{
"UserPoolClient": {
"UserPoolId": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+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_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+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": "echo \"=== Routes ===\"; aws apigatewayv2 get-routes --api-id 61e4be54 --region us-east-1\necho \"=== Authorizers ===\"; aws apigatewayv2 get-authorizers --api-id 61e4be54 --region us-east-1\necho \"=== Integration ===\"; aws apigatewayv2 get-integration --api-id 61e4be54 --integration-id 1a96a878 --region us-east-1\necho \"=== API CORS ===\"; aws apigatewayv2 get-api --api-id 61e4be54 --region us-east-1 --query CorsConfiguration\necho \"=== Stage ===\"; aws apigatewayv2 get-stage --api-id 61e4be54 --stage-name '$default' --region us-east-1\necho \"=== Domain ===\"; aws apigatewayv2 get-domain-name --domain-name api.harbor.example --region us-east-1 --query 'DomainNameConfigurations[0].SecurityPolicy'",
"description": "Verify API config"
}=== Routes ===
{
"Items": [
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/read:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "adf79acd",
"RouteKey": "GET /things/{id}",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/write:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "4013221a",
"RouteKey": "POST /things",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationScopes": [
"harbor-api/admin:things"
],
"AuthorizationType": "JWT",
"AuthorizerId": "2a1ac7d6",
"RouteId": "a0c55a31",
"RouteKey": "DELETE /things/{id}",
"Target": "integrations/1a96a878"
},
{
"ApiKeyRequired": false,
"AuthorizationType": "NONE",
"RouteId": "219176e8",
"RouteKey": "OPTIONS /{proxy+}",
"Target": "integrations/1a96a878"
}
]
}
=== Authorizers ===
{
"Items": [
{
"AuthorizerId": "2a1ac7d6",
"AuthorizerType": "JWT",
"IdentitySource": [
"$request.header.Authorization"
],
"JwtConfiguration": {
"Audience": [
"yqevu5hwyfjv2h9kfvl1llqv1v"
],
"Issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df"
},
"Name": "harbor-jwt-auth"
}
]
}
=== Integration ===
{
"ConnectionType": "INTERNET",
"IntegrationId": "1a96a878",
"IntegrationMethod": "POST",
"IntegrationType": "AWS_PROXY",
"IntegrationUri": "arn:aws:lambda:us-east-1:000000000000:function:harbor-api-handler",
"PayloadFormatVersion": "2.0",
"TimeoutInMillis": 30000
}
=== API CORS ===
{
"AllowCredentials": false,
"AllowHeaders": [
"content-type",
"authorization"
],
"AllowMethods": [
"GET",
"POST",
"DELETE",
"OPTIONS"
],
"AllowOrigins": [
"https://app.harbor.example"
],
"MaxAge": 600
}
=== 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\",\"integrationStatus\":\"$context.integrationStatus\",\"integrationErrorMessage\":\"$context.integrationErrorMessage\",\"integrationLatency\":\"$context.integrationLatency\",\"responseLatency\":\"$context.responseLatency\"}"
},
"AutoDeploy": true,
"CreatedDate": "2026-05-16T16:33:46.187167+00:00",
"DefaultRouteSettings": {
"DetailedMetricsEnabled": true,
"ThrottlingBurstLimit": 10,
"ThrottlingRateLimit": 5.0
},
"DeploymentId": "07299bf9",
"LastDeploymentStatusMessage": "Successfully deployed stage with deployment ID '07299bf9'",
"LastUpdatedDate": "2026-05-16T16:39:48.043498+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}": {
…[truncated]{
"command": "echo \"=== Lambda policy ===\"; aws lambda get-policy --function-name harbor-api-handler --region us-east-1\necho \"=== Function URLs ===\"; aws lambda list-function-url-configs --function-name harbor-api-handler --region us-east-1\necho \"=== Role policies ===\"; aws iam list-role-policies --role-name harbor-api-handler-role --region us-east-1; aws iam get-role-policy --role-name harbor-api-handler-role --policy-name harbor-api-dlq-send --region us-east-1\necho \"=== KMS policy ===\"; aws kms get-key-policy --key-id 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --policy-name default --region us-east-1\necho \"=== KMS rotation ===\"; aws kms get-key-rotation-status --key-id 236ca3aa-d3ba-47f3-87db-91ebe4042a47 --region us-east-1 --query KeyRotationEnabled\necho \"=== Alarm ===\"; aws cloudwatch describe-alarms --alarm-names harbor-api-5xx-alarm --region us-east-1 --query 'MetricAlarms[0].AlarmActions'\necho \"=== Log group retention ===\"; aws logs describe-log-groups --log-group-name-prefix /aws/apigw/harbor-api --region us-east-1 --query 'logGroups[0].retentionInDays'\necho \"=== Client ===\"; aws cognito-idp describe-user-pool-client --user-pool-id us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df --client-id yqevu5hwyfjv2h9kfvl1llqv1v --region us-east-1",
"description": "Verify lambda, kms, alarm, client config"
}=== Lambda policy ===
{
"Policy": "{\"Version\": \"2012-10-17\", \"Id\": \"default\", \"Statement\": [{\"Sid\": \"apigw-invoke\", \"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:61e4be54/*/*\"}}}]}",
"RevisionId": "c9da67d9-6d17-4a42-8fc2-92667082681b"
}
=== Function URLs ===
{
"FunctionUrlConfigs": []
}
=== Role policies ===
{
"PolicyNames": [
"harbor-api-dlq-send"
]
}
{
"RoleName": "harbor-api-handler-role",
"PolicyName": "harbor-api-dlq-send",
"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:DescribeKey\"\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 ===
true
=== Alarm ===
[
"arn:aws:sns:us-east-1:000000000000:harbor-api-alarms"
]
=== Log group retention ===
90
=== Client ===
{
"UserPoolClient": {
"UserPoolId": "us-east-1_f9868f8f502c4bd2ada5f86b7bf1b2df",
"ClientName": "harbor-api-client",
"ClientId": "yqevu5hwyfjv2h9kfvl1llqv1v",
"ClientSecret": "8680f8c4",
"LastModifiedDate": "2026-05-16T16:33:31.930330+00:00",
"CreationDate": "2026-05-16T16:33:31.930333+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]
=== Lambda policy ===
{
"Policy": "{\"Version\": \"2012-10-17\", \"Id\": \"default\", \"Statement\": [{\"Sid\": \"apigw-invoke\", \"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:61e4be54/*/*\"}}}]}",
"RevisionId": "c9da67d9-6d17-4a42-8fc2-92667082681b"
}
=== Function URLs ===
{
"FunctionUrlConfigs": []
}
=== Role policies ===
{
"PolicyNames": [
"harbor-api-dlq-send"
]
}
{
"RoleName": "harbor-api-handler-role",
"PolicyName": "harbor-api-dlq-send",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:us-east-1:00
…[truncated]{
"taskId": "7",
"status": "completed"
}Updated task #7 status
No file changes, the agent left the workspace untouched.
downloading uv 0.9.7 aarch64-unknown-linux-gnu
Downloading botocore (12.7MiB)
Downloading pygments (1.2MiB)
Downloading pygments
Downloading botocore
Installed 13 packages in 525ms
============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.4.1, pluggy-1.6.0 -- /root/.cache/uv/archive-v0/SMp0eN0PD7XC0KKQWc9a9/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 FAILED [ 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%]
=================================== FAILURES ===================================
________________ test_61_log_group_retention_finite_and_bounded ________________
def test_61_log_group_retention_finite_and_bounded():
"""C11: Log group retentionInDays set and ≤ 30 (never-expiring access logs are a billing finding)."""
logs = _client("logs")
grps = logs.describe_log_groups(logGroupNamePrefix=LOG_GROUP)["logGroups"]
grp = next((g for g in grps if g["logGroupName"] == LOG_GROUP), None)
assert grp, f"log group {LOG_GROUP!r} not found; got {[g.get('logGroupName') for g in grps]}"
rd = grp.get("retentionInDays")
assert rd is not None, (
f"log group {LOG_GROUP!r} has no retentionInDays , defaults to 'Never expire'. "
f"That's a billing audit finding; set a finite retention"
)
> assert 0 < int(rd) <= 30, (
f"log group retentionInDays={rd!r}; must be a positive int ≤ 30 per the platform baseline"
)
E AssertionError: log group retentionInDays=90; must be a positive int ≤ 30 per the platform baseline
E assert 90 <= 30
E + where 90 = int(90)
/tests/test_outputs.py:964: AssertionError
=============================== warnings summary ===============================
test_outputs.py: 200 warnings
/root/.cache/uv/archive-v0/SMp0eN0PD7XC0KKQWc9a9/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_
… (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_7587152f80334e29. Re-running the agent live requires EVAL_PLATFORM_ENABLE_OAUTH_SMOKE=1 and is non-deterministic.
Trial trial_7587152f80334e29 · verifier authoritative; classifier explanatory.