Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sdk): updating the aws-sdk to version 3.577.0 #5611

Merged
merged 24 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/awscdk/src/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Construct, IConstruct } from "constructs";
import { cloud, std, core } from "@winglang/sdk";
import { NotImplementedError } from "@winglang/sdk/lib/core/errors";
import { createBundle } from "@winglang/sdk/lib/shared/bundling";
import { IAwsFunction, PolicyStatement } from "@winglang/sdk/lib/shared-aws";
import { IAwsFunction, PolicyStatement, externalLibraries } from "@winglang/sdk/lib/shared-aws";
import { resolve } from "path";
import { renameSync, rmSync, writeFileSync } from "fs";
import { App } from "./app";
Expand Down Expand Up @@ -73,7 +73,7 @@ export class Function
// This is a workaround for https://github.com/aws/aws-cdk/issues/28732
const inflightCodeApproximation = this._getCodeLines(inflight).join("\n");
writeFileSync(this.entrypoint, inflightCodeApproximation);
const bundle = createBundle(this.entrypoint);
const bundle = createBundle(this.entrypoint, externalLibraries);

const code = Code.fromAsset(resolve(bundle.directory));

Expand All @@ -96,7 +96,7 @@ export class Function

// produce an inflight code bundle using the latest information, including all
// changes made to captured variables/resources after the constructor
const bundle = createBundle(this.entrypoint);
const bundle = createBundle(this.entrypoint, externalLibraries);

// copy files from bundle.directory to this.assetPath
const assetDir = resolve(App.of(this).outdir, this.assetPath);
Expand Down
20 changes: 10 additions & 10 deletions libs/wingsdk/.projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion libs/wingsdk/.projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { JsonFile, cdk, javascript, DependencyType } from "projen";

const JSII_DEPS = ["constructs@^10.3"];
const CDKTF_VERSION = "0.20.3";
const AWS_SDK_VERSION = "3.490.0";
const AWS_SDK_VERSION = "3.577.0";

const CDKTF_PROVIDERS = [
"aws@~>5.31.0",
Expand Down
20 changes: 10 additions & 10 deletions libs/wingsdk/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions libs/wingsdk/src/shared-aws/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ import { INFLIGHT_SYMBOL } from "../core/types";
import { IInflightHost, Node, Resource } from "../std";
import * as ui from "../ui";

export const externalLibraries = [
"@aws-sdk/client-sso",
"@aws-sdk/client-sso-oidc",
"@aws-sdk/credential-provider-ini",
"@aws-sdk/credential-provider-process",
"@aws-sdk/credential-provider-sso",
"@aws-sdk/credential-provider-web-identity",
"@aws-sdk/token-providers",
];
Chriscbr marked this conversation as resolved.
Show resolved Hide resolved

/**
* A shared interface for AWS functions.
*/
Expand Down
9 changes: 7 additions & 2 deletions libs/wingsdk/src/target-tf-aws/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ import { NotImplementedError } from "../core/errors";
import { createBundle } from "../shared/bundling";
import { DEFAULT_MEMORY_SIZE } from "../shared/function";
import { NameOptions, ResourceNames } from "../shared/resource-names";
import { Effect, IAwsFunction, PolicyStatement } from "../shared-aws";
import {
Effect,
IAwsFunction,
PolicyStatement,
externalLibraries,
} from "../shared-aws";
import { IInflightHost, Resource } from "../std";
import { Duration } from "../std/duration";

Expand Down Expand Up @@ -268,7 +273,7 @@ export class Function extends cloud.Function implements IAwsFunction {
// write the entrypoint next to the partial inflight code emitted by the compiler, so that
// `require` resolves naturally.

const bundle = createBundle(this.entrypoint);
const bundle = createBundle(this.entrypoint, externalLibraries);

// would prefer to create TerraformAsset in the constructor, but using a CDKTF token for
// the "path" argument isn't supported
Expand Down
4 changes: 3 additions & 1 deletion libs/wingsdk/test/shared-aws/bucket.inflight.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,9 @@ test("Given a bucket when reaching to a non-existent key, signed url it should t
);
});

test("Given a bucket, when giving one of its keys, we should get its signed url", async () => {
// Skipped due to issue with mocking getSignedUrl:
// https://github.com/m-radzikowski/aws-sdk-client-mock/issues/62
test.skip("Given a bucket, when giving one of its keys, we should get its signed url", async () => {
// GIVEN

const BUCKET_NAME = "BUCKET_NAME";
Expand Down