Package command uploads entire directory when using SAM InlineCode
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
SAM recently released support for `InlineCode`, however, when the package command gets run it zips+uploads the entire current directory (even though it doesn't get used). I believe this is the issue https://github.com/aws/aws-cli/blob/d0fd4d2e2856e441156c0ba333eb119c7abd977e/awscli/customizations/cloudformation/artifact_exporter.py#L125.
Repro:
Create a SAM template with the following Resource:
```yaml
MyFunction:
Type: AWS::Serverless::Function
Properties:
InlineCode: |
exports.handler = async (event) => {
return event
}
Handler: index.handler
Runtime: nodejs8.10
```
Run `aws cloudformation package` command.
Result: You can see the entire current directory gets zipped and uploaded to S3.
Expected: It doesn't.
Contributor guide
Assessment
This issue has not been assessed yet.