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

docs: Updated blurb about installing via npm #536

Closed
wants to merge 34 commits into from

Conversation

Doug-AWS
Copy link
Contributor

@Doug-AWS Doug-AWS commented Aug 9, 2018

npm command installs the latest released version

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

@rix0rrr
Copy link
Contributor

rix0rrr commented Aug 9, 2018

Not sure this is better. It uses more words to describe something that's pretty obvious anyway.

@Doug-AWS
Copy link
Contributor Author

Doug-AWS commented Aug 9, 2018

Actually what I wanted to get across is that you can use it to update your current CDK bits. For those not familiar with npm. So there's no need to uninstall the previous version, which is often the case with other systems.

But if we think this is over-kill, just close it.

@eladb
Copy link
Contributor

eladb commented Aug 10, 2018

Maybe we can explicitly call out the upgrade use case instead of just allude to it...

alexcasalboni and others added 5 commits August 13, 2018 11:05
As we move to using namespace imports across the CDK, the naming we
chose for Lambda classes become cumbersome (i.e. `lambda.LambdaRuntime`).
This change renames all lambda classes to adhere to service semantics.

BREAKING CHANGE

* LambdaRef => lambda.FunctionRef
* Lambda => lambda.Function
* LambdaVersion => lambda.FunctionVersion
* LambdaRuntime => lambda.Runtime
* LambdaCode => lambda.Code (and all subclasses)
* InlineJavaScriptLambda => lambda.InlineJavaScriptFunction (soon to be deprecated)
* LambdaPermission => lambda.Permission
* SingletonLambda => SingletonFunction

Updated tests to use import-requires.

Intentionally avoided file renames to facilitate code review. Will do so
in a subsequent PR.

Fixes #430
Allow specifying a maximum session duration for roles.

Fixes #543
Adds support for S3 bucket notifications. The `bucket.onEvent`
method will add a notification destination for a bucket.

The s3.INotificationDestination interface is used
to allow SNS, SQS and Lambda to implement notification
destinations. This interface inverts the control and
allows the destination to prepare to receive notifications.
For example, it can modify it's policy appropriately.

Since CloudFormation bucket notification support require two-phase
deployments (due to the fact PutBucketNotification will fail if
the destination policy has not been updated, and CloudFormation
cannot create the policy until the bucket is created). The reason this
is a limitation in CloudFormation is that they could not model the
1:1 relationship between the bucket and the notifications using the
current semantics of CloudFormation.

In the CDK, we can model this relationship by encapsulating the
notifications custom resource behind a bucket. This means that users
don't interact with this resource directly, but rather just subscribe
to notifications on a bucket, and the resource (and accompanying handler)
will be created as needed.
Explicitly called out upgrading
@Doug-AWS Doug-AWS changed the title Updated blurb about installing via npm docs: Updated blurb about installing via npm Aug 13, 2018
Elad Ben-Israel and others added 18 commits August 14, 2018 10:36
Adds a property `uniqueId` to Construct which returns an 
alphanumeric 255-length-limited tree-unique identity for a construct.

Relax constraints for construct id (previously known as "name") to only
restrict the usage of the path separator. Otherwise, all characters are
allowed. This will allow using the construct id for a wider range of
purposes, but since logical IDs (and uniqueId now) are alpha-safe, it's 
okay.

Deprecate `construct.name` in favor of `construct.id`.
Lambda permissions granted when it was added as an event rule target
did not include "SourceArn" as required. This allowed any event rule
to trigger the function, and also did not show as a trigger in the AWS
Lambda console.

Added a integration test to verify.

BREAKING CHANGE

To fix this, we needed to modify `IEventRuleTarget` to pass the ARN of
the rule and a unique ID to the registered target in order to allow it
to specify the Source ARN. This required fixing all existing event rule
targets (which, so far would return a role to be assumed by CWE, so the
source ARN was not required).

Fixes #555
The JS SDK assumes the file exists when it is passed as an argument, so
this change makes the CDK Toolkit check for file existence before
passing down to the SDK layer. Additionally, the SDK "ini file"
re-implementation failed to check for file existece before attempting to
load file contents.

Fixes #540
Allow SNS topics to be used as bucket notification destinations.

To avoid taking a dependency on aws-s3, extracted the bucket notification destination API
into a separate module @aws-cdk/aws-s3-notifications, which only includes the required
interfaces.

We still take a devDependency on s3, but that's fine.

Added examples/** to the global .nycrc
Allow Lambda functions to be used as destinations for S3 bucket
notifications.
…nfig (#565)

Since `readFile` returns a `Buffer` and `ini.parse` expects 
a string, we need `toString()`.

Fixes #563
* Added blurb about examples are in TypeScript by default

* Update index.rst

Changed "reference section for the service' to a link to the Reference section.
* Use node.js "crypto" module instead of md5
* Remove `construct.name` (and fix all dependencies)
* Remove non-alphanumeric after "Resource" is omitted

BREAKING CHANGE: `construct.name` => `construct.id`
Allow sqs.Queue to be used as a destination for bucket notifications.
Also supports queues that are server-side encrypted using a custom KMS key.

Added support for specifying KMS keys in `QueueRef`, including export/import support.

Added support to `kms.EncryptionKey` to allow forbidding "no-op" when
adding policy statements. This is needed in order to fail the user from
subscribing a queue to receive bucket notifications without the ability
to allow S3 to read the confirmation messages from the queue as described
in the S3 documentation [1]

[1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ways-to-add-notification-config-to-bucket.html
BREAKING CHANGE:
1. Introduce a new aws-codepipeline-api package, and move the Actions API there.
2. Move the service-specific Actions back into their service packages.
* Add a resolve to ArtifactPath

When using artifact path for template configuration, the CDK would get upset.
This just adds a resolve that falls back to that location.

Fixes #570

* Resolve location at l2 time
Tokens (such as resource attributes) can now be implicitly converted
into strings. This allows using any late-bound CloudFormation value
where strings can be used in the host language, and the native string
facilities of the host language can be used as well to further process
strings.

The process is reversed by the resolve() function during synthesis,
which will split the string up again into string literals and
CloudFormation intrinsics (combined by `{Fn::Join}`).

Introduces `CloudFormationJSON.stringify` to produce a similar result,
but used for JSON-encoding of complex objects that may contain Tokens.
This is used in JSON-encoded policy statements, CloudFormation actions,
state machine definitions, and more.

Additional changes:
- Add a VSCode launch config (with a helper script) to directly debug a
  unit test from within the IDE. This allows setting breakpoints.
- SecretParameter no longer duckily implements Token; this will not work
  in other jsii languages anyway.
- Nested `FnConcat` structures will be flattened in the CloudFormation
  output.

Fixes #24 and #168.
ParameterOverrides needs to be a JSON-encoded object, not an object
itself.

Fixes #566.
### Features

* __@aws-cdk/cdk__: Tokens can now be transparently embedded into
  strings and encoded into JSON without losing their semantics. This
  makes it possible to treat late-bound (deploy-time) values as if they
  were regular strings ([@rix0rrr] in
  [#518](#518)).
* __@aws-cdk/aws-s3__: add support for bucket notifications to Lambda,
  SNS, and SQS targets ([@eladb] in
  [#201](#201),
  [#560](#560),
  [#561](#561),
  [#564](#564))
* __@aws-cdk/cdk__: non-alphanumeric characters can now be used as
  construct identifiers ([@eladb] in
  [#556](#556))
* __@aws-cdk/aws-iam__: add support for `maxSessionDuration` for Roles
  ([@eladb] in [#545](#545)).

### Changes

* __@aws-cdk/aws-lambda__ (_**BREAKING**_): most classes renamed to be
  shorter and more in line with official service naming (`Lambda`
  renamed to `Function` or ommitted) ([@eladb] in
  [#550](#550))
* __@aws-cdk/aws-codepipeline__ (_**BREAKING**_): move all CodePipeline
  actions from `@aws-cdk/aws-xxx-codepipeline` packages into the regular
  `@aws-cdk/aws-xxx` service packages ([@skinny85] in
  [#459](#459)).
* __@aws-cdk/aws-custom-resources__ (_**BREAKING**_): package was
  removed, and the Custom Resource construct added to the
  __@aws-cdk/aws-cloudformation__ package ([@rix0rrr] in
  [#513](#513))

### Fixes

* __@aws-cdk/aws-lambda__: Lambdas that are triggered by CloudWatch
  Events now show up in the console, and can only be triggered the
  indicated Event Rule. _**BREAKING**_ for middleware writers (as this
  introduces an API change), but transparent to regular consumers
  ([@eladb] in [#558](#558))
* __@aws-cdk/aws-codecommit__: fix a bug where `pollForSourceChanges`
  could not be set to `false` ([@maciejwalkowiak] in
  [#534](#534))
* __aws-cdk__: don't fail if the `~/.aws/credentials` file is missing
  ([@RomainMuller] in
  [#541](#541))
* __@aws-cdk/aws-cloudformation__: fix a bug in the CodePipeline actions
  to correctly support TemplateConfiguration ([@mindstorms6] in
  [#571](#571)).
* __@aws-cdk/aws-cloudformation__: fix a bug in the CodePipeline actions
  to correctly support ParameterOverrides ([@mindstorms6] in
  [#574](#574)).

### Known Issues

* `cdk init` will try to init a `git` repository and fail if no global
  `user.name` and `user.email` have been configured.
…with other Actions. (#492)

BREAKING CHANGE: move the S3 CodePipeline Action out of the aws-codepipeline package
and into the aws-s3 package, and rename it from AmazonS3Source to PipelineSource.
…instead of parent. (#568)

BREAKING CHANGE: this commit changes the way we pass a Pipeline to a newly created Stage.
Instead of passing it as a parent, in the first argument of the constructor,
we now pass it through a separate props object, in the pipeline property.
This is in order to make Stage more consistent with other Constructs,
and with the changes made to the Actions API in #459.
cookejames and others added 8 commits August 16, 2018 08:09
The docs state that you should be able to create a cluster with a single instance however there is a trivial error that prevents this.
Refactoring of the object model for connection/security groups so that a
SecurityGroup object can be used as the target of an .allowTo()
statement:

    cluster.connections.allowTo(securityGroup)

SecurityGroupRef is now abstract and needs to be constructed using
SecurityGroupRef.import(). This is also the mechanism for importing
a non-constructed SecurityGroup into the construct tree. 

As part of the refactoring:

- Get rid of IDefaultConnectable, the functionality has been folded into
  IConnectable/Connections.
- Get rid of ISecurityGroup.
- Rename IConnectionPeer => ISecurityGroupRule.
- Drastically simplify implementation, get rid of recursion and classes
  to enable the recursion to terminate. All complex logic is now nicely
  contained within Connections.

This change is BREAKING to connections-enabled construct writers, but
transparent to application builders.

Fixes #579.
Allow bucket notification destinations to specify
dependency elements that are added to the bucket notification resource.

This is to ensure that S3 will be able to validate the subscription
when notifications are configured.
Explicitly called out upgrading
@@ -45,7 +45,7 @@ on AWS.
* For a detailed walkthrough, see [Getting Started] in the AWS CDK [User Guide]
* See [Manual Installation](./MANUAL_INSTALLATION.md) for installing the CDK from a signed .zip file

Install the [AWS CDK Toolkit] from npm (requires [Node.js ≥ 8.11.x](https://nodejs.org/en/download)):
Install the [AWS CDK Toolkit] or update your installed version of the |cdk| to the latest version from npm (requires [Node.js ≥ 8.11.x](https://nodejs.org/en/download)):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just phrase as:

Install or update the [AWS CDK Toolkit] using npm:

And be done with it? The shorter the easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@Doug-AWS
Copy link
Contributor Author

Hmm, it looks like there's ~300 file changes, likely because I need to rebase.

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.

8 participants