Repository: aws/aws-cli

Issue:
Check if AWS::Include location is a string before packacing. Fixes #4087
Fixes #4087 

If the value of Location in AWS::Include is *not* a string, we should skip
packaging it. This can happen if customers use, say, an intrinsic function
to construct the Include location:

Example:
```
AWS::Include:
  Location:
    Fn::Sub: "${S3Bucket}/file.txt"
```

*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.



Discussion:
# [Codecov](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=h1) Report
> Merging [#4230](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=desc) into [develop](https://codecov.io/gh/aws/aws-cli/commit/96ab53d6781ae9c97daad484424707a7e61c43fa?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/aws/aws-cli/pull/4230/graphs/tree.svg?width=650&token=aKPbq1EbIm&height=150&src=pr)](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=tree)

```diff
@@           Coverage Diff            @@
##           develop    #4230   +/-   ##
========================================
  Coverage    94.41%   94.41%           
========================================
  Files          188      188           
  Lines        14151    14151           
========================================
  Hits         13360    13360           
  Misses         791      791
```


| [Impacted Files](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...customizations/cloudformation/artifact\_exporter.py](https://codecov.io/gh/aws/aws-cli/pull/4230/diff?src=pr&el=tree#diff-YXdzY2xpL2N1c3RvbWl6YXRpb25zL2Nsb3VkZm9ybWF0aW9uL2FydGlmYWN0X2V4cG9ydGVyLnB5) | `98.61% <100%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=footer). Last update [96ab53d...7e84d90](https://codecov.io/gh/aws/aws-cli/pull/4230?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -27,8 +27,7 @@ def find_version(*file_paths):
             'colorama>=0.2.5,<=0.3.9',
             'docutils>=0.10',
             'rsa>=3.1.2,<=3.5.0',
-            's3transfer>=0.2.0,<0.3.0',
-            'PyYAML>=3.10,<=3.13']
+            's3transfer>=0.2.0,<0.3.0']
 
 
 if sys.version_info[:2] == (2, 6):
@@ -36,6 +35,12 @@ def find_version(*file_paths):
     # was not in stdlib until 2.7.
     requires.append('argparse>=1.1')
 
+    # For Python 2.6, we have to require a different verion of PyYAML since the latest
+    # versions dropped support for Python 2.6.
+    requires.append('PyYAML>=3.10,<=3.13')
+else:
+    requires.append('PyYAML>=3.10,<=5.1')
+
 
 setup_options = dict(
     name='awscli',


Test patch: