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

Merge #17

Merged
merged 156 commits into from
Jun 30, 2020
Merged

Merge #17

merged 156 commits into from
Jun 30, 2020

Conversation

flemjame-at-amazon
Copy link
Owner


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

skinny85 and others added 30 commits June 11, 2020 22:28
#8507)

BREAKING CHANGE: the property 'instanceClass' in DatabaseInstanceNewProps has been renamed to 'instanceType'

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Similar to #8487, but this time in the test scripts instead of the build ones.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
### Commit Message
feat(appsync): add Construct for AppSync HTTP DataSource

* ADD GraphQLApi.addHttpDataSource()
* ADD interface HttpDataSourceProps
* ADD class HttpDataSource

Closes #8007 
### End Commit Message

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
In the VTL template for dynamoDbPutItem, variable declaration was being
mixed with the JSON value. Fix this and add unit tests.

Fixes #7026

Signed-off-by: Duarte Nunes <duarte@uma.ni>


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [@types/glob](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/glob) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/glob)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Neta Nir <neta1nir@gmail.com>
The apigateway CDK construct library creates a large number of
CloudFormation resources.
To define a single Method that is backed with a Lambda function and
authorizer with an Authorizer, ~8 CloudFormation resources are created.
This quickly grows and a reasonable sized RestApi is bound to hit the
200 resource limit on their stack.

Re-organizing the CDK app into multiple `Stack`s that share the same
instance of `RestApi` will not resolve this problem, since the CDK
still makes an executive decision to keep the Methods and Resources in
the same stack as the `RestApi` construct. (see #7391)

This change introduces a new import style API `fromRestApiAttributes()`
that returns an instance of `IRestApi` that allows for new Resources to
be defined across stacks.

As a nice side effect, this change also adds the ability to define
Resources on SpecRestApi in addition to what has already been defined in
the OpenAPI spec.

closes #1477
closes #7391
fixes #8347


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [fast-check](https://github.com/dubzzz/fast-check) from 1.24.2 to 1.25.0.
- [Release notes](https://github.com/dubzzz/fast-check/releases)
- [Changelog](https://github.com/dubzzz/fast-check/blob/master/CHANGELOG.md)
- [Commits](dubzzz/fast-check@v1.24.2...v1.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
…8258)

This prevents throttling issues on stacks with a lot of Lambdas.

fixes #8257

Implemented configurable `maxRetries` and `base` properties as part of the LogRetentionRetryOptions. The AWS SDK also supports specifying a customBackoff function. I skipped that as it's hard to implement in the current setup (impossible to provide a callback function in the event JSON).

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ca (#8509)

The DatabaseInstanceReadReplicaProps interface was extending an incorrect interface,
and thus required passing an 'engine' property when creating it,
even though that property was never rendered in the resulting CloudFormation template.

BREAKING CHANGE: the property `engine` can no longer be passed when creating a DatabaseInstanceReadReplica

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Use partition ref for lambda and s3 data events

Closes #8247


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
… RunLambaTask task to use LambdaInvoke (#8530)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
)

Hash the hash when using `AssetHashType.CUSTOM`.

This makes sure we can use this hash in a file/directory name. The
resulting hash will also have the same length as for other hash types.

Fixes #8513


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Includes patches:
* The "create missing libraries" script failed because the dependency generator for `monocdk-experiment` had changed.
* `AWS::IoT::ProvisioningTemplate.Properties.Tags` is defined to have `{ "ItemType": "Json" }`,  which should have been `{ "PrimitiveItemType": "Json" }`.

---

See [CHANGELOG](https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/cfnspec/CHANGELOG.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.2.3 to 26.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.17.25 to 10.17.26.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [fast-check](https://github.com/dubzzz/fast-check) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/dubzzz/fast-check/releases)
- [Changelog](https://github.com/dubzzz/fast-check/blob/master/CHANGELOG.md)
- [Commits](dubzzz/fast-check@v1.25.0...v1.25.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.691.0 to 2.697.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.691.0...v2.697.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [jszip](https://github.com/Stuk/jszip) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/master/CHANGES.md)
- [Commits](Stuk/jszip@v3.4.0...v3.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.2 to 2.21.2.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.20.2...v2.21.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
…ode (#8534)

In [`mainfest.ts`](https://github.com/aws/aws-cdk/blob/master/packages/@aws-cdk/cloud-assembly-schema/lib/manifest.ts#L31) we call `fs.readFileSync` with encoding set to `UTF-8`:

```
fs.readFileSync(filePath, 'UTF-8')
```

Which works with `@type/node` <= `13.x` as the method signature has 3 overload:

```typescript
function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer;

function readFileSync(path: PathLike | number, options: { encoding: string; flag?: string; } | string): string;

function readFileSync(path: PathLike | number, options?: { encoding?: string | null; flag?: string; } | string | null): string | Buffer;
``` 
> see [@types/node@13](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v13/fs.d.ts) which is the one we currently [use](https://github.com/aws/aws-cdk/blob/master/yarn.lock#L1538)

Due to TypeScript structural typing the call in `manifest.ts` matches the second overload, however in `@types/node@14`  the `encoding` value must be in lower case to match the [BufferEncoding](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/c8cde12e761213859f29df8e83b09b5965a89528/types/node/globals.d.ts#L173) enum.

This commit changes all `fs.readFileSync` calls to:

```typescript
fs.readFileSync(filePath, { encoding: 'utf-8' })
```

Which work with all version of `@types/node`

### Why do I care?

Well, this breaks when linking the CDK locally (using the lovely [`link-all`](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md#linking-against-this-repository))  and using it with an application that declares dependency on `@types/node` >= 14. Addtionaly this will break when we upgrade `@types/node` from 13 to 14 (should we be using 13?)

 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
chore(certificate-manager): change naming from Amazon to AWS

Certificate Manager's naming should match the official AWS naming: https://aws.amazon.com/certificate-manager/


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
chore(custom-resources): fix broken links in readme

Closes #8539

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ers (#8456)

Api Gateway doesn't accept domain name with upercase letters as per [its documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#aws-resource-apigateway-domainname-properties).

This lead me to find out at CF deployment that my stack had an issue when this could have been discovered at build time.

fixes #8428



----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…8515)


Add a test to verify stacks are serialized to the manifest file in a topological order, based on their dependencies. By adding this test we are committing to maintain the topological order of the stacks in the manifest file, allowing users to consume it without needing to sort the stacks. 

Note that all of the CDK toolkit commands such as `cdk list` and `cdk deploy` already assume this and do not sort stacks upon execution.
> see [`cdk list`](https://github.com/aws/aws-cdk/blob/master/packages/aws-cdk/lib/cdk-toolkit.ts#L264) and [`cdk deploy`](https://github.com/aws/aws-cdk/blob/master/packages/aws-cdk/lib/cdk-toolkit.ts#L111) for reference  

I have initially added the test in `cx-api` module but after more consideration I think it is better suited in the `core` module since we want to verify this behavior in the context of a CDK application. I have left both tests in this PR for the sake of discussion in the event the reviewer thinks this actually fits better in `cx-api`.

helps #8436

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…oup (#8221)

feat(globalaccelerator): support Accelerator, Listener and EndpointGroup

- Add `Accelerator`, `Listener` and `EndpointGroup` resources
- support `addEndpoint`, `addLoadBalancer`, `addElasticIpAddress` and `addEc2Instance` to add any supported endpoint into the `EndpointGroup`

Closes #5527 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
shivlaks and others added 29 commits June 29, 2020 05:53
… derived classes (#8768)

`renderTask()` has been marked internal and renamed to `_renderTask()` to align
with naming convention of internal APIs

Motivation:
users do not directly need to interact or use this API.
It's responsible for rendering all Amazon States Language (ASL) properties
for service integrations to Step Functions.

the `toStateJson()` API is public on the `State` class and can be used
in tests for users that want to look at a task state's configuration.

the partial configuration that comes from `_renderTask()` is included
in the `toStateJson()` API.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This resolves a problem with timeout parameter being passed down to Helm. The Helm version used (v3) expects a duration (in our case, in seconds such as `600s`) instead of integer.

fixes #8718

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…8555)

Replacement for the current implementation of experimental Evaluate Expression.
Merges state and service integration properties and represents them as a
construct.

Note that the changes to test are only the reordering of elements.
Re-ran the integration test and verified that it functions as documented.

BREAKING CHANGE:
`EvaluateExpression` is now a construct representing a task state rather than an embedded property called `task`

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Skip the test target to speed up building up to the module. This will
significantly improve the speed to arrive to a working module after
check out.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…8739)

- bump aws-lambda-layer-kubectl [2.0.0](https://github.com/aws-samples/aws-lambda-layer-kubectl/releases/tag/2.0.0)
with kubectl v1.16.8-eks-e16311, awscli 1.18.86 and helm 3.2.4
- update the helm repo of the kubernetes-dashboard in the integ test to `https://kubernetes.github.io/dashboard/` from [Helm Hub](https://hub.helm.sh/charts/k8s-dashboard) as `https://kubernetes-charts.storage.googleapis.com` has been deprecated

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#8785)

Root cause here was that `LambdaIntegration` used the deprecated
`restApi` property on its binding Method. This property does not work
on imported RestApi and has been superceded by the property `api`.

A further bug that was discovered was that the API `methodArn()` on the
Method construct did not work on imported RestApi. This has been fixed
up such that if a `deploymentStage` is not defined for the imported
RestApi, the ARN will return '*' as its stage (shorthand for 'all
stages').

fixes #8679


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change increases the timeout to `yarn install` to stabilize the Gitpod prebuilds.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…ds (#8784)

buildup and builddown currently use two entirely different approaches.
This fix makes the builddown mirror the current buildup script, and alters foreach to
support a --down flag in addition to --up.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
### Commit Message
chore(appsync):  Fix sample code on README

- Add comma on `new UserPool()`

#8764 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
AWS Backup Vault names must be between 2 and 50 characters. The characters must be alphanumeric, a hyphen, or an underscore.

Fixes: #8689

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes #8745 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…8767)

The new bundler uses `mkdtempSync` to pre-create uniquely named directories for asset staging. But, `mkdtempSync` creates the staging directories with a restrictive `0700 & ~umask` mode, rather than `mkdir`'s usual `0777 & ~umask` mode.

In Bitbucket Pipelines, these restrictive permissions prevent the bundler from accessing its `/asset-output` volume. And, if the bundler can't access `/asset-output`, bundling fails.

This fix chmods the asset staging directory to 0777. This change fixes my Bitbucket Pipelines issue.

Closes #8757 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.706.0 to 2.707.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.706.0...v2.707.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
)

Replacement for the current implementation of `ECS` service integration.
Merges state and service integration properties and represents them as a
construct.

The notable differences from the current implementation are:
* single implementation class`runTask` with an added `launchTarget` required
property where the properties specific to the launch type are specified
* linter disable of `ref-via-interface` as we need to use `TaskDefinition`
because properties that are not known for imported task definitions are required
* older implementations have been marked deprecated with direction to the
replacement.

Left all of the unit tests (except fargate platform version which was not
previously honored) and integ test expectations verbatim to ensure that
we have not lost fidelity. 

BREAKING CHANGE:
* `containerName` is not supported as an override anymore and has been replaced by `containerDefinition`

Closes #8610


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
chore(eks): support create namespace with helm 

- add `createNamespace` property for `eks.HelmChart`
- set the `wait` flag correctly for HelmChart custom resource

Fixes: #7216 #7209 #8713

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adds a pkglint validation so that we always include `**/cdk.out` in our `.npmignore` files. This will prevent us from accidentally publishing cdk artifacts that were generated during build/test.
 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Adds a pkglint validation so that we always include `**/cdk.out` in our `.npmignore` files. This will prevent us from accidentally publishing cdk artifacts that were generated during build/test.
 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
See [CHANGELOG](https://github.com/aws/aws-cdk/blob/patch/v1.47.1/CHANGELOG.md)

Notice i've added a synthetic `Bug Fix` because the commit itself was a chore, and we would have an empty changelog otherwise...

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Allow specific a Security Group (`ISecurityGroup`) when defining an
AutoScalingGroup. This allows passing in a group created in the same stack or
passing in an imported group.
feat(autoscaling): bring your own security group
Turn the `aws-ec2` nodeunit test set into a Jest test set.

In order to speed up the conversion, I did not actually rewrite the
tests. Instead, I added a shim layer which converts between the two
APIs. That means we're free to ditch the nodeunit dependency add future
tests in Jest format, while spending minimal effort on the conversion.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
closes #8808

Co-authored-by: Neta Nir <neta1nir@gmail.com>
Generated role arn invalid due to missing colons (e.g. arnawsiam)

Closes #6706


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@flemjame-at-amazon flemjame-at-amazon merged commit 151f927 into flemjame-at-amazon:master Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.