8
8
- [ Migration] ( #migration )
9
9
- [ 0.x or 1.x -\> 2.x] ( #0x-or-1x---2x )
10
10
- [ Fine-grained Access Control] ( #fine-grained-access-control )
11
+ - [ Enabling Post-ingest SNS publishing] ( #enabling-post-ingest-sns-publishing )
11
12
- [ 0.4.x -\> 0.5.x] ( #04x---05x )
12
13
- [ Elasticsearch to OpenSearch Migration] ( #elasticsearch-to-opensearch-migration )
13
14
- [ Preferred Elasticsearch to OpenSearch Migration Process] ( #preferred-elasticsearch-to-opensearch-migration-process )
@@ -135,6 +136,47 @@ As of 2.0.0, only OpenSearch is supported and only using fine-grained access con
135
136
It is recommended to follow the migration path to upgrade to fine-grained access control
136
137
first and then upgrade to stac-server 2.x.
137
138
139
+ #### Enabling Post-ingest SNS publishing
140
+
141
+ stac-server now has the ability to publish all ingested entities (Items and Collections)
142
+ to an SNS topic. Follow these stesp to add this to an exisiting deployment. These
143
+ configurations are also in the serverless.example.yml file, so reference that if it is
144
+ unclear exactly where to add this in your config.
145
+
146
+ Explicitly set the provider/environment setting for STAC_API_URL so the ingested entities
147
+ published to the topic will have their link hrefs set correctly. If this is not set,
148
+ the entities will still be published, with with incorrect link hrefs.
149
+
150
+ ``` text
151
+ STAC_API_URL: "https://some-stac-server.com"
152
+ ```
153
+
154
+ Add the SNS topic resource:
155
+
156
+ ``` text
157
+ postIngestTopic:
158
+ Type: AWS::SNS::Topic
159
+ Properties:
160
+ TopicName: ${self:service}-${self:provider.stage}-post-ingest
161
+ ```
162
+
163
+ For the ` ingest ` Lambda resource definition, configure the ARN to publish to by adding:
164
+
165
+ ``` text
166
+ environment:
167
+ POST_INGEST_TOPIC_ARN: !Ref postIngestTopic
168
+ ```
169
+
170
+ Add IAM permissions with the statement:
171
+
172
+ ``` text
173
+ - Effect: Allow
174
+ Action:
175
+ - sns:Publish
176
+ Resource:
177
+ Fn::GetAtt: [postIngestTopic, TopicArn]
178
+ ```
179
+
138
180
### 0.4.x -> 0.5.x
139
181
140
182
#### Elasticsearch to OpenSearch Migration
@@ -521,11 +563,9 @@ aws lambda invoke \
521
563
/dev/stdout
522
564
` ` `
523
565
524
- Stac-server is now ready to ingest data!
525
-
526
566
# ### OpenSearch fine-grained access control
527
567
528
- As of version 2.0.0, stac-server on"ly supports fine-grained access control to
568
+ As of version 2.0.0, stac-server only supports fine-grained access control to
529
569
OpenSearch, and no longer supports "AWS Connection" mode.
530
570
531
571
**Warning**: Unfortunately, fine-grained access control cannot be enabled on an
@@ -634,8 +674,8 @@ so that stac-server can access them.
634
674
The preferred mechanism for populating the OpenSearch credentials to stac-server is to
635
675
create a secret in AWS Secret Manager that contains the username and password. The
636
676
recommended name for this Secret corresponds
637
- to the stac-server deployment as `{stage}/{service}/ opensearch`, e.g.,
638
- ` dev/ my-stac-server/ opensearch` .
677
+ to the stac-server deployment as `${service}-${stage}- opensearch-user-creds `, e.g.,
678
+ ` my-stac-server-dev- opensearch-user-creds ` .
639
679
640
680
The Secret type should be "Other type of secret" and
641
681
have two keys, `username` and `password`, with the appropriate
@@ -645,14 +685,14 @@ Add the `OPENSEARCH_CREDENTIALS_SECRET_ID` variable to the serverless.yml sectio
645
685
`environment` :
646
686
647
687
` ` ` yaml
648
- OPENSEARCH_CREDENTIALS_SECRET_ID: ${self:provider.stage}/ ${self:service}/ opensearch
688
+ OPENSEARCH_CREDENTIALS_SECRET_ID: ${self:service}- ${self:provider.stage}- opensearch-user-creds
649
689
` ` `
650
690
651
691
Add to the IAM Role Statements :
652
692
653
693
` ` ` yaml
654
- - Effect: " Allow"
655
- Resource: " arn:aws:secretsmanager:${aws:region}:${aws:accountId}:secret:${self:provider.stage}/${self:service}/opensearch-*"
694
+ - Effect: Allow
695
+ Resource: arn:aws:secretsmanager:${aws:region}:${aws:accountId}:secret:${self:provider.environment.OPENSEARCH_CREDENTIALS_SECRET_ID}-*
656
696
Action: "secretsmanager:GetSecretValue"
657
697
` ` `
658
698
@@ -674,6 +714,8 @@ OPENSEARCH_PASSWORD: xxxxxxxxxxx
674
714
Setting these as environment variables can also be useful when running stac-server
675
715
locally.
676
716
717
+ Stac-server is now ready to ingest data!
718
+
677
719
# ## Proxying Stac-server through CloudFront
678
720
679
721
The API Gateway URL associated with the deployed stac-server instance may not be the URL that you ultimately wish to expose to your API users. AWS CloudFront can be used to proxy to a more human readable URL. In order to accomplish this :
0 commit comments