Skip to content
This repository was archived by the owner on Apr 2, 2021. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
7ef0b03
update latest releases
dchelimsky Jul 26, 2019
8a11e1a
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.352
dchelimsky Jul 26, 2019
eeb307c
update latest releases
dchelimsky Aug 2, 2019
4be92ff
improve version updater
dchelimsky Aug 9, 2019
1170ab0
update latest releases
dchelimsky Aug 9, 2019
092aeef
changes
dchelimsky Aug 10, 2019
f90508a
fix typo
dchelimsky Sep 16, 2019
3f6833f
update latest releases
dchelimsky Sep 16, 2019
7e37dde
bump dep on test.check
dchelimsky Sep 20, 2019
8b4f646
update latest releases
dchelimsky Sep 20, 2019
81016f3
update comment in dynamodb example
dchelimsky Sep 23, 2019
71dc18a
update latest releases
dchelimsky Sep 23, 2019
3820d8e
update latest releases
dchelimsky Sep 24, 2019
4697bad
update latest releases
dchelimsky Sep 24, 2019
72dc4dc
update deps in examples alias
dchelimsky Sep 27, 2019
3b03007
add fn to update versions in deps.edn
dchelimsky Sep 27, 2019
8129074
update latest versions
dchelimsky Sep 27, 2019
e84050f
upgrade some deps
dchelimsky Sep 27, 2019
311e370
just provide an atom with the map we want instead of updating it afte…
dchelimsky Oct 4, 2019
5f6fdbd
wrap dynamic require of protocol ns in locking form
dchelimsky Oct 4, 2019
373688d
Changes
dchelimsky Oct 4, 2019
7cba6c6
upgrade deps in pom
dchelimsky Oct 4, 2019
7c15e8e
move autodoc dep to pom profile
dchelimsky Oct 4, 2019
fdcc840
update deps in pom when releasing
dchelimsky Oct 4, 2019
5b8478b
update latest releases
dchelimsky Oct 12, 2019
9667c18
improve release-log-map (build tooling)
dchelimsky Oct 19, 2019
bfc09aa
update latest releases
dchelimsky Oct 19, 2019
012dbc0
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.378
dchelimsky Oct 19, 2019
fda4926
format changes file
dchelimsky Oct 19, 2019
0432b52
make send-request async, prevent go pool deadlock
stuarthalloway Oct 23, 2019
4b9053c
fix reflection warning
stuarthalloway Oct 23, 2019
5e91866
CHANGES
dchelimsky Oct 24, 2019
d962d3c
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.383
dchelimsky Oct 24, 2019
bc44a3a
upgrade to http-client 0.1.101
dchelimsky Oct 24, 2019
a3c73ed
update pom
dchelimsky Oct 24, 2019
19bb40a
remove duplicate fn
dchelimsky Oct 24, 2019
c29a84f
stop blocking on fulfillment of send-request*
ghadishayban Oct 25, 2019
b69039e
CHANGES
dchelimsky Oct 25, 2019
d49d4c4
one less channel
dchelimsky Oct 25, 2019
fc251a3
update latest releases
dchelimsky Oct 25, 2019
d7af4d9
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.391
dchelimsky Oct 25, 2019
db58364
CHANGES
dchelimsky Oct 25, 2019
49b7d21
(+ type-hints coercion) #=> less reflection
dchelimsky Oct 29, 2019
a1bdf93
use static parse methods instead of deprecated constructors
ghadishayban Oct 29, 2019
37be99d
warn on reflection
dchelimsky Oct 29, 2019
3e5d870
update latest releases
dchelimsky Nov 1, 2019
ca2c464
update the issue template to stress the importance of a complete example
dchelimsky Nov 8, 2019
a38ce31
update latest releases
dchelimsky Nov 9, 2019
74ef845
anomalies/category (not anomaly/category)
dchelimsky Nov 14, 2019
2bbce10
use Double and Long static parse methods
dchelimsky Nov 16, 2019
73ca9c3
CHANGES
dchelimsky Nov 16, 2019
d2f2a2b
remove file added by accident
dchelimsky Nov 18, 2019
ebeba57
use credentialScope or region (from endpoint config) for signing
dchelimsky Nov 18, 2019
40ac16c
upgrade core.async and data.json
dchelimsky Nov 20, 2019
96e510c
include documentationUrl in doc output when available
dchelimsky Nov 25, 2019
d4ea21e
update latest releases
dchelimsky Nov 26, 2019
6d6556f
Update deps in pom.xml
dchelimsky Nov 26, 2019
813b0ad
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.408
dchelimsky Nov 26, 2019
4247587
update latest releases
dchelimsky Nov 26, 2019
892daf6
skip API docs for dynaload
dchelimsky Nov 29, 2019
f89f33f
update latest releases
dchelimsky Dec 3, 2019
cb0ae38
update latest releases
dchelimsky Dec 3, 2019
3946589
update latest releases
dchelimsky Dec 4, 2019
1a7d405
latest releases
dchelimsky Dec 5, 2019
d9b6e42
update latest releases
dchelimsky Dec 10, 2019
64b0aba
latest releases
dchelimsky Dec 16, 2019
e5d5f4e
remove commons-codec dependency
puredanger Dec 19, 2019
bb12b16
CHANGELOG
dchelimsky Dec 19, 2019
476fd72
add test for hex-encode
puredanger Dec 20, 2019
aaf6898
latest releases
dchelimsky Dec 28, 2019
4f17ad8
update latest releases
dchelimsky Jan 11, 2020
c7f8ff2
convey anomaly from http-client as/is
dchelimsky Jan 17, 2020
393be06
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.423
dchelimsky Jan 17, 2020
5254b9a
latest releases
dchelimsky Jan 18, 2020
635a0df
latest releases
dchelimsky Jan 26, 2020
5cad085
upgrade http-client to 0.1.104
dchelimsky Feb 3, 2020
8506d17
update latest releases
dchelimsky Feb 10, 2020
f5acd9b
Introduce shared http-client
dchelimsky Feb 10, 2020
e954e91
Update deps in pom.xml
dchelimsky Feb 10, 2020
2f966de
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.430
dchelimsky Feb 10, 2020
5cf8f6c
can't put nil on a channel
dchelimsky Feb 11, 2020
96e5170
depend on latest endpoints and s3 for dev
dchelimsky Feb 13, 2020
05c5ef9
ensure invoke doesn't hang when no region, creds, or endpoint
dchelimsky Feb 13, 2020
d5f66df
update changelog
dchelimsky Feb 14, 2020
e07877d
these aren't loops
dchelimsky Feb 14, 2020
903e96d
add test for http-request and response on invoke result meta
dchelimsky Feb 14, 2020
2958ede
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.437
dchelimsky Feb 14, 2020
cd91885
update latest releases
dchelimsky Feb 14, 2020
080e2a7
Update CHANGES.md
dchelimsky Feb 14, 2020
2d57c12
update latest releases
dchelimsky Feb 21, 2020
ae8e74b
separate cred/region fetch-async threadpool from refresh scheduler
dchelimsky Feb 25, 2020
feff770
lock on cred/region provider to ensure one request at a time
dchelimsky Feb 25, 2020
aff9028
calc ttl in assume role example
dchelimsky Feb 25, 2020
8324929
changelog
dchelimsky Feb 25, 2020
2e4bca7
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.445
dchelimsky Feb 25, 2020
259df17
latest releases
dchelimsky Mar 1, 2020
0dc6c38
latest releases
dchelimsky Mar 23, 2020
3a22732
upgrade core.async, data.json, and tools.logging deps
dchelimsky Mar 26, 2020
954bd3c
clean up requires
dchelimsky Mar 26, 2020
7971924
use parking put (>!) instead of put! inside a go block
dchelimsky Mar 27, 2020
1f47405
rename threads for clarity
dchelimsky Mar 27, 2020
5e3a267
let core.async manage the threadpool for fetching credentials and reg…
dchelimsky Mar 26, 2020
8150dfc
changes
dchelimsky Mar 27, 2020
151cf40
latest releases
dchelimsky Mar 27, 2020
15136d6
Update deps in pom.xml
dchelimsky Mar 27, 2020
0640788
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.456
dchelimsky Mar 27, 2020
8c5c1dd
add Contributors section to README
dchelimsky Mar 28, 2020
549d74d
latest releases
dchelimsky May 3, 2020
769cfa5
latest releases
dchelimsky May 16, 2020
0060a34
update latest releases
dchelimsky May 24, 2020
e0b6fc9
latest releases
dchelimsky Jul 3, 2020
076df0a
fix bug parsing iso8601 dates with fractional seconds
dchelimsky Jul 10, 2020
c1e1a41
upgrade core.async and tools.logging
dchelimsky Jul 10, 2020
c03d3a0
changelog
dchelimsky Jul 10, 2020
c305fae
fix memory leak caused by validating requests
dchelimsky Jul 10, 2020
7cd2e7a
changelog
dchelimsky Jul 10, 2020
91b69d2
latest releases
dchelimsky Jul 10, 2020
5e5255c
Update deps in pom.xml
dchelimsky Jul 10, 2020
ecad8a3
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.469
dchelimsky Jul 10, 2020
2518db4
update latest releases
dchelimsky Jul 24, 2020
5ed30af
update latest-releases
dchelimsky Aug 10, 2020
917f05f
wrap string in map with payload key
dchelimsky Aug 15, 2020
bfb2148
changelog
dchelimsky Aug 16, 2020
5ea6697
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.474
dchelimsky Aug 16, 2020
69bce81
latest releases
dchelimsky Aug 16, 2020
ed247d7
qualify all deps
dchelimsky Aug 16, 2020
99b913a
remove garbage from pom.xml
dchelimsky Aug 16, 2020
e984ccc
ignore user's deps.edn when generating the pom
dchelimsky Aug 16, 2020
9d66853
update docstring
dchelimsky Sep 9, 2020
690553b
update latest releases
dchelimsky Nov 3, 2020
4503b2a
make parse-date tolerant of nils
dchelimsky Nov 3, 2020
d665cfe
fix bug parsing iso8601 dates
dchelimsky Nov 5, 2020
fdccb14
changelog
dchelimsky Nov 5, 2020
1eb24f5
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.484
dchelimsky Nov 5, 2020
bcdf365
updated latest releases
dchelimsky Nov 22, 2020
5334a53
latest releases
dchelimsky Nov 23, 2020
8256677
latest releases
dchelimsky Dec 1, 2020
688bd1b
latest releases
dchelimsky Dec 2, 2020
c4ca969
latest releases
dchelimsky Dec 8, 2020
93c6ac0
remove unused :endpoint key in destructuring vector
dchelimsky Dec 17, 2020
cbc02f3
latest releases
dchelimsky Dec 28, 2020
fc12f59
bump some deps
dchelimsky Dec 28, 2020
b65d61d
reduce reflection warnings
dchelimsky Jan 3, 2021
515daf9
more warn-on-reflection
dchelimsky Jan 3, 2021
c1f9393
fix doc for endpoint/resolve* fn
dchelimsky Jan 4, 2021
e333d53
add support for sessionToken system prop
dchelimsky Jan 9, 2021
41c9f74
Update deps in pom.xml
dchelimsky Jan 9, 2021
4a15daf
Update README.md, CHANGES.md, and latest-releases.edn with 0.8.498
dchelimsky Jan 9, 2021
1e24c81
latest releases
dchelimsky Jan 9, 2021
b15d42c
Merge remote-tracking branch 'cognitect/master'
Jan 19, 2021
f7fc9fd
Qualify dep
Jan 19, 2021
ffae5df
Using providers for signing and creating queries
Jan 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ e.g.
## Description with failing test case

Please describe what you are trying to do, what you expect to see, and
what you're seeing instead. Include a code example that we can paste
as/is into a REPL, execute, and watch fail.
what you're seeing instead.

*Important*: Please include a complete minimal code example that we
can paste as/is into a REPL, execute, and watch fail.

## Stack traces

Expand Down
68 changes: 66 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
# aws-api 0.8
# aws-api

### DEV
## 0.8.484 / 2020-11-05

* make date parsing more tolerant [#155](https://github.com/cognitect-labs/aws-api/issues/155)

## 0.8.474 / 2020-08-15

* fix bug decoding GetBucketPolicy response [#148](https://github.com/cognitect-labs/aws-api/issues/148)

## 0.8.469 / 2020-07-10

* fix bug parsing iso8601 dates with fractional seconds [#144](https://github.com/cognitect-labs/aws-api/issues/144)
* fix memory leak when validating requests [#143](https://github.com/cognitect-labs/aws-api/issues/143)

## 0.8.456 / 2020-03-27

* upgrade to tools.logging-1.0.0, data.json-1.0.0, and core.async-1.0.567
* let core.async manage the threadpool for fetching credentials and region
* fixes deadlock with concurrent credentials fetch [#137](https://github.com/cognitect-labs/aws-api/issues/137)

## 0.8.445 / 2020-02-25

* fix deadlock using composite credentials providers (e.g. assume role example) [#130](https://github.com/cognitect-labs/aws-api/issues/130)

## 0.8.437 / 2020-02-14

* fix issue with `invoke` hanging when no region or creds are found [#124](https://github.com/cognitect-labs/aws-api/issues/124)

## 0.8.430 / 2020-02-10

* upgrade to com.cognitect/http-client 0.1.104 [#115](https://github.com/cognitect-labs/aws-api/issues/115)
* all aws clients use shared http-client, credentials-provider, and region-provider by default
* addresses [#109](https://github.com/cognitect-labs/aws-api/issues/109)
* first call to invoke takes hit of fetching region and credentials
* `com.cognitect.aws.api/stop` will not stop the shared http-client, but stop any other instance

See [Upgrade Notes](https://github.com/cognitect-labs/aws-api/blob/master/UPGRADE.md) for more
information about upgrading to this version.

## 0.8.423 / 2020-01-17

* Remove dep on commons-codec [#113](https://github.com/cognitect-labs/aws-api/issues/113)
* Convey anomaly from http-client as/is [#114](https://github.com/cognitect-labs/aws-api/issues/114)

## 0.8.408 / 2019-11-25

* Reduce noise from reflection warnings in java 9+ [#106](https://github.com/cognitect-labs/aws-api/issues/106)
* Get signing region from endpoint config [#105](https://github.com/cognitect-labs/aws-api/issues/105)
* Add documentationUrl when available [#108](https://github.com/cognitect-labs/aws-api/issues/108)

## 0.8.391 / 2019-10-25

* Fix: S3 HeadObject fails with large files [#97](https://github.com/cognitect-labs/aws-api/issues/97)
* This was fixed in cognitect/http-client 0.1.101
* Fix concurrency 4 limit introduced in 0.8.383

## ~~0.8.383 / 2019-10-24~~

* Make http calls to fetch credentials async / non-blocking.

## 0.8.378 / 2019-10-19

* Include service full names in latest-releases.edn [#32](https://github.com/cognitect-labs/aws-api/issues/32)
* Wrap dynamic require of protocol ns in locking form [#92](https://github.com/cognitect-labs/aws-api/issues/92)

## 0.8.352 / 2019-07-26

* Use custom dynaload for http-client [#88](https://github.com/cognitect-labs/aws-api/issues/88)
* Restores compatibility with Clojure-1.9
Expand Down
65 changes: 43 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ of your choice, e.g. `com.cognitect.aws/s3`.
To use, for example, the s3 api, add the following to deps.edn

``` clojure
{:deps {com.cognitect.aws/api {:mvn/version "0.8.345"}
com.cognitect.aws/endpoints {:mvn/version "1.1.11.592"}
com.cognitect.aws/s3 {:mvn/version "726.2.488.0"}}}
{:deps {com.cognitect.aws/api {:mvn/version "0.8.498"}
com.cognitect.aws/endpoints {:mvn/version "1.1.11.934"}
com.cognitect.aws/s3 {:mvn/version "810.2.817.0"}}}
```

* See [latest releases](latest-releases.edn) for a list of the latest releases of
Expand Down Expand Up @@ -175,7 +175,7 @@ involved example using AWS STS.

## Region lookup

The aws-api client looks up the region the same with the [java
The aws-api client looks up the region the same way the [java
SDK](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-region-selection.html)
does, with an additional check for a System property named
"aws.region" after it checks for the AWS_REGION environment variable
Expand Down Expand Up @@ -216,27 +216,16 @@ the `:path` in the `:endpoint-override` map.

## http-client

NOTE: the behavior of `com.cognitect.aws.api/client` and `com.cognitect.aws.api/stop`
changed as of release 0.8.430. See [Upgrade
Notes](https://github.com/cognitect-labs/aws-api/blob/master/UPGRADE.md)
for more information.

The aws-api client uses an http-client to send requests to AWS,
including any operations you invoke _and_ fetching the region and
credentials when you're running in EC2 or ECS. By default, each
aws-api client creates its own http-client, which, in turn, manages
its own resources. Invoke `cognitect.aws.client.api/stop` on the
client if you want it to shut down any resources it and its
http-client are using.

If you're creating multiple aws-api clients, you can, optionally,
create a single http-client and share it across aws-api clients e.g.

``` clojure
(require '[cognitect.aws.client.api :as aws])
(def http-client (aws/default-http-client))
(def s3-client (aws/client {:api :s3 :http-client http-client}))
(def ssm-client (aws/client {:api :ssm :http-client http-client}))
;; etc
```

If you call `stop` on `s3-client` or `ssm-client` in this example, the
single http-client gets shut down for both.
aws-api client uses a single, shared http-client, whose resources
are managed by aws-api.

## Contributing

Expand All @@ -246,6 +235,27 @@ aws-api is incorporated into products and client projects, we prefer
to do development internally and are not accepting pull requests or
patches.

## Contributors

`aws-api` was extracted from an internal project at Cognitect, and
some contributors are missing from the commit log. Here are all the
folks from Cognitect who either committed code directly, or
contributed significantly to research and design:

[Timothy Baldridge](https://github.com/halgari)<br/>
[David Chelimsky](https://github.com/dchelimsky)<br/>
[Benoît Fleury](https://github.com/benfle)<br/>
[Fogus](https://github.com/fogus)<br/>
[Stuart Halloway](https://github.com/stuarthalloway)<br/>
[Rich Hickey](https://github.com/richhickey)<br/>
[George Kierstein](https://github.com/MissInterpret)<br/>
[Carin Meier](https://github.com/gigasquid)<br/>
[Alex Miller](https://github.com/puredanger)<br/>
[Michael Nygard](https://github.com/mtnygard)<br/>
[Ghadi Shayban](https://github.com/ghadishayban)<br/>
[Joseph Smith](https://github.com/solussd)<br/>
[Marshall Thompson](https://github.com/Glassonion)

## Troubleshooting

### General
Expand Down Expand Up @@ -276,6 +286,17 @@ access.
Remedy: check [AWS Regions and Endpoints](https://docs.aws.amazon.com/general/latest/gr/rande.html),
and supply the correct endpoint as described in [nodename nor servname provided, or not known](#nodename-nor-servname-provided-or-not-known), above.

#### Ops limit reached

The underlying http-client has a `:pending-ops-limit` configuration
which, when reached, results in an exception with the message "Ops
limit reached". As of this writing, aws-api does not provide access to
the http-client's configuration. Programs that encounter "Ops limit
reached" can avoid it by creating separate http-clients for each
aws-client. You may wish to explicitly stop
(`com.cognitect.aws.api/stop`) these aws-clients when the are not
longer in use to conserve resources.

### S3 Issues

#### "Invalid 'Location' header: null"
Expand Down
48 changes: 48 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Upgrade Notes

## 0.8.430

This release changed the behavior of the following functions:

### com.cognitect.aws.api/client

As of 0.8.430, each aws-api client uses a single shared http-client by
default. Before this release, each aws-client got its own instance of
http-client by default, which caused the number of threads consumed to
increase linearly in relation to the number of aws-clients created.
To reduce resource consumption in the case of many aws-clients, we
recommended that you create a single instance of the http-client and
explicitly share it across all aws-clients. This is no longer
necessary.

### com.cognitect.aws.api/stop

With the introduction of a shared http-client, this function was
updated so that it has no effect when using the shared http-client,
but will continue to call `cognitect.aws.http/stop` on any other
http-client instance.

### effects

These changes have the following effects:

Programs that were creating multiple aws-clients without supplying
an http-client, and without ever calling stop, will see a reduction
in resource consumption.

Programs that were creating an instance of
`cognitect.aws.client.api/default-http-client` and sharing it across
aws-clients should see no change. You can, however, safely stop doing
that.

For programs that were using the default aws-client constructor and
calling stop on each aws-client, the shared http-client will not be
shut down. This should have no negative impact on resource consumption,
as there is only one http-client in this case, and its resources are
managed by aws-api.

For programs that were creating multiple aws-clients in order to get
around an ["Ops limit reached"
error](https://github.com/cognitect-labs/aws-api/issues/98), this is a
breaking change. For this case, we recommend, for now, that you supply
a new http-client for each aws-client.
2 changes: 1 addition & 1 deletion build/doc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

echo "Building docs...\n"
rm -rf ./target/autodoc
mvn clojure:autodoc
mvn -Pautodoc clojure:autodoc

echo -e "Checking out gh-pages branch\n"
rm -rf gh-pages
Expand Down
11 changes: 10 additions & 1 deletion build/release
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ set -e
echo "Cleaning..."
rm -rf ./target

echo "Aligning pom.xml with deps.edn ..."
clj -Srepro -Spom
if [ "$(git diff pom.xml)" = "" ]; then
echo "nothing to change"
else
git add pom.xml
git commit -m "Update deps in pom.xml"
fi

echo "Calculating version..."
prefix=`cat VERSION_PREFIX`
suffix=`build/revision`
Expand All @@ -23,7 +32,7 @@ git tag -a v${version} -m "Release ${version}"
git push origin v${version}

echo "Updating README.md, CHANGES.md, and latest-releases.edn with ${version}"
clj -A:update-versions
clj -A:update-versions --update-latest-releases --update-changelog --update-readme
git commit -m "Update README.md, CHANGES.md, and latest-releases.edn with ${version}" \
README.md CHANGES.md latest-releases.edn
git push
Expand Down
68 changes: 0 additions & 68 deletions build/src/cognitect/aws/release_updater.clj

This file was deleted.

Loading