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

feat: support govcloud and china regions #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jthomerson
Copy link
Member

Rather than hard-coding the partition, pull it from the ARN

Rather than hard-coding the partition, pull it from the ARN
@jthomerson
Copy link
Member Author

@jeremygiberson-at-privoro 👋

@jeremygiberson-at-privoro

I'll need to do this during work hours, so I'll give it a try Monday.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 90.385% when pulling 3cd95da on gov-cloud-partition into 793b516 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 90.385% when pulling 3cd95da on gov-cloud-partition into 793b516 on master.

@jeremygiberson-at-privoro

FYI I didn't forget about this. I've got to wait for the next scheduled release before I can give this a try. GovCloud access is much more restricted so I can play around in it when ever I want.

Nov 18th is the next scheduled release that I should be able to try this out.

@jeremygiberson-at-privoro

Finally had the opportunity to give this a test in Gov cloud.
Unfortunately, it did not work.

 Serverless Error ---------------------------------------
 
  Invalid parameter: TopicArn Reason: A us-gov-east-1 ARN must begin with arn:aws-us-gov, not arn:aws:sns:us-gov-east-1:#REDACTED#:canary-project-topic

It looks like the permission resource was not generated correctly:

    "HelloLambdaPermissionCanaryprojecttopic": {
      "Type": "AWS::Lambda::Permission",
      "Properties": {
        "FunctionName": {
          "Fn::GetAtt": [
            "HelloLambdaFunction",
            "Arn"
          ]
        },
        "Action": "lambda:InvokeFunction",
        "Principal": "sns.amazonaws.com",
        "SourceArn": {
          "Fn::Join": [
            ":",
            [
              "arn:aws:sns",
              {
                "Ref": "AWS::Region"
              },
              {
                "Ref": "AWS::AccountId"
              },
              "canary-project-topic"
            ]
          ]
        }
      }
    },

Here is my serverless.yml that I am using:

service: canary-project
frameworkVersion: '2'

plugins:
  - serverless-plugin-external-sns-events

provider:
  name: aws
  runtime: nodejs12.x

functions:
  hello:
    handler: handler.hello
    events:
      - externalSNS: 'canary-project-topic'
resources:
  Resources:
    CanaryProjectSnsTopic:
      Type: "AWS::SNS::Topic"
      Properties:
        DisplayName: Canary Project Topic
        TopicName: canary-project-topic

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.

3 participants