Skip to content

Add support for aws cloudformation package of AWS::AppSync::FunctionC…#3822

Merged
justindho merged 1 commit intoaws:developfrom
mkrn:develop
May 26, 2022
Merged

Add support for aws cloudformation package of AWS::AppSync::FunctionC…#3822
justindho merged 1 commit intoaws:developfrom
mkrn:develop

Conversation

@mkrn
Copy link
Contributor

@mkrn mkrn commented Dec 28, 2018

Add support for aws cloudformation package of AWS::AppSync::FunctionConfiguration RequestMappingTemplateS3Location and ResponseMappingTemplateS3Location properties

Related issue #3816

@codecov-io
Copy link

codecov-io commented Dec 28, 2018

Codecov Report

Merging #3822 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3822      +/-   ##
===========================================
+ Coverage    94.42%   94.42%   +<.01%     
===========================================
  Files          186      186              
  Lines        14049    14057       +8     
===========================================
+ Hits         13266    13274       +8     
  Misses         783      783
Impacted Files Coverage Δ
...customizations/cloudformation/artifact_exporter.py 98.55% <100%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e6dce6...04f640f. Read the comment docs.

@Zerquix18
Copy link

+1 Templates look really messy without this

@xentek
Copy link
Contributor

xentek commented Jan 17, 2019

Is this ready for merge? /cc: @justnance

@xentek
Copy link
Contributor

xentek commented Jan 17, 2019

I forked from aws/aws-cli@develop and applied the @mkrn's patch

I can confirm it works and am now installing the patched CLI with:

pip install --user --upgrade -e git+https://github.com/groundbreaker/aws-cli.git@develop#egg=awscli

As of this writing the aws-cli version is v1.16.90.

I can't promise I will keep the fork up to date, so I recommend you doing your own fork, etc

@jfuss
Copy link

jfuss commented Jan 18, 2019

@mkrn Make sure you update the tests to include coverage of the new resources: https://github.com/aws/aws-cli/blob/develop/tests/unit/customizations/cloudformation/test_artifact_exporter.py#L62

@xentek
Copy link
Contributor

xentek commented Jan 22, 2019

HI @jfuss! I submitted a new PR to replace this one, since I wasn't sure if @mkrn was going to get back to this PR (and I'd really like to go back to using the official release with my team 😎).

Perhaps we can merge #3883 and can close out this one?

Cheers!

:shipit:

@sharmmoh1983
Copy link

Is the support added? Can I use aws package command for FunctionConfiguration?

@xentek
Copy link
Contributor

xentek commented Feb 27, 2019

@sharmmoh1983 yes, aws-cli/1.16.111 has the support for FunctionConfiguration

@sharmmoh1983
Copy link

sharmmoh1983 commented Feb 27, 2019

@xentek Thanks for your input.
Will aws-cli/1.16.114 will also work?

I tried with 1.16.114 version but still there is no support for FunctionConfiguration
Function does get uploaded to s3 and Template Url does not get updated

Output of aws package

Description: 
      FunctionVersion: 2018-05-29
      RequestMappingTemplateS3Location: ../functions/xxx-request-template.vtl"
      ResponseMappingTemplateS3Location: ../functions/xxx-response-template.vtl"

@xentek
Copy link
Contributor

xentek commented Feb 28, 2019

@sharmmoh1983 pip install --upgrade awscli worked for me. If you used homebrew to originally install the cli, homebrew's formula always runs behind the official release (brew info awscli reports version 1.16.100 on my machine).

If that is the case, then this might do the trick for you: brew uninstall awscli && pip install awscli.

@sharmmoh1983
Copy link

sharmmoh1983 commented Feb 28, 2019

@xentek I ran the mentioned commands and version in my system is aws-cli/1.16.114 which is higher than 1.16.111 but still FunctionConfiguration is not working as its happening for other resources for aws package command

I have also mentioned the snapshot of cloudformation script generated after aws package command in above comments?

Do I have to have only 1.16.111 version to make it work ?

This is the output I am getting

brew info awscli
awscli: stable 1.16.110 (bottled), HEAD
Official Amazon AWS command-line interface

@xentek
Copy link
Contributor

xentek commented Feb 28, 2019

@sharmmoh1983 aws --version will tell you the version you have installed. which aws will tell you where that aws version is coming from. Due to numerous factors (homebrew vs pip, python virtualenvs, user vs system installs (e.g. pip install --user), you could end up with multiple (conflicting) versions of a python module installed. It will be hard for me to debug that from here.

1.16.111 is the version my fix showed up in, and is the version I'm still running (and using every day to package my AppSync FunctionConfiguration). I can't imagine that my patch was removed from later versions, so 1.16.114 should still be fine.

I'm afraid I have no other advice to provide to get the latest version installed on your machine. Happy Hunting!

@sharmmoh1983
Copy link

@xentek Thanks for your inputs. It is working now on version 1.16.114

@kdaily kdaily added cloudformation package-deploy customization Issues related to CLI customizations (located in /awscli/customizations) labels Oct 20, 2021
…onfiguration RequestMappingTemplateS3Location and ResponseMappingTemplateS3Location properties
Copy link
Contributor

@justindho justindho left a comment

Choose a reason for hiding this comment

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

Thanks, @mkrn!

@justindho justindho merged commit c9cedb1 into aws:develop May 26, 2022
@justindho justindho added pending-release This issue will be fixed by an approved PR that hasn't been released yet. released and removed pending-release This issue will be fixed by an approved PR that hasn't been released yet. labels May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloudformation package-deploy community customization Issues related to CLI customizations (located in /awscli/customizations) released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants