diff --git a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpProtocolGeneratorUtils.java b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpProtocolGeneratorUtils.java index b5ecb701734..17f87b6b2c5 100644 --- a/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpProtocolGeneratorUtils.java +++ b/smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpProtocolGeneratorUtils.java @@ -188,7 +188,10 @@ static void generateMetadataDeserializer(GenerationContext context, SymbolRefere writer.openBlock("const deserializeMetadata = (output: $T): __ResponseMetadata => ({", "});", responseType, () -> { writer.write("httpStatusCode: output.statusCode,"); - writer.write("requestId: output.headers[\"x-amzn-requestid\"]"); + writer.write("requestId: output.headers[\"x-amzn-requestid\"] ??" + + " output.headers[\"x-amzn-request-id\"],"); + writer.write("extendedRequestId: output.headers[\"x-amz-id-2\"],"); + writer.write("cfId: output.headers[\"x-amz-cf-id\"],"); }); writer.write(""); }